Bezalel Posted March 27, 2006 Posted March 27, 2006 (edited) Do you want to use the same CD for installing Windows on multiple computer from differant manufacturers and still maintain Pre-activation? If so I can help but I need your help. I've written a VBScript file that will try to determine who the manufacturer and what model your computer is. The third line of output is the manufacturer string converted into Hex. Please reply with the output from this VBScript so that I can make a database of manufacturer's strings. Please only reply if your computer was built by a Royalty OEM.strComputer = "."Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")Set colComputer = objWMIService.ExecQuery("Select * from Win32_ComputerSystem")For Each objComputer in colComputer MfgHex="" for i=1 to len(objComputer.Manufacturer) MfgHex=MfgHex & Hex(Asc(Mid(objComputer.Manufacturer,i,1))) If i Mod 4 = 0 then MfgHex=MfgHex & " " Next ComputerReport = ("Manufacturer: " & objComputer.Manufacturer & vbCrLf &_ "Model: " & objComputer.Model & vbCrLf &_ MfgHex)NextWScript.Echo ComputerReportSample outputManufacturer: Dell Computer Corp.Model: PowerVault 715N44656C6C 20436F6D 70757465 7220436F 72702EThis code hase been modified by gunsmokingman to output the report to a text file.strComputer = "."Dim Act, ComputerReport, Fso, Dtop, Report, TsSet Act = CreateObject("Wscript.Shell")Set Fso = CreateObject("Scripting.FileSystemObject")Dtop = Act.SpecialFolders("Desktop")Set Ts = Fso.CreateTextFile(Dtop & "\ComputerReport.txt")Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")Set colComputer = objWMIService.ExecQuery("Select * from Win32_ComputerSystem")For Each objComputer In colComputer MfgHex="" For i=1 To Len(objComputer.Manufacturer) MfgHex=MfgHex & Hex(Asc(Mid(objComputer.Manufacturer,i,1))) If i Mod 4 = 0 then MfgHex=MfgHex & " " Next ComputerReport = (space(3) & "Manufacturer: " & objComputer.Manufacturer & vbCrLf &_ space(3) & "Model: " & objComputer.Model & vbCrLf & space(3)& MfgHex)NextTs.WriteLine ComputerReport : Ts.Close Act.Run(Chr(34)& Dtop & "\ComputerReport.txt" & Chr(34)),1,True Edited March 28, 2006 by Bezalel 1
Djé Posted March 27, 2006 Posted March 27, 2006 Nice idea But i've got 3 of them (different manufs), I am lazier than you, I don't know vbscript enough AND the output is a msgbox from which i cannot copy/paste !Can you improve this (clipboard is enough, I'll do the rest) please?
Bezalel Posted March 27, 2006 Author Posted March 27, 2006 I origionally wanted to use the clipboard but MS doesn't let VBScript files access the clipboard. I changed the code from MsgBox to WScript.Echo so you can redirect the output to a text filecscript /nologo GetMfgName.vbs >> MfgName.txt
Djé Posted March 28, 2006 Posted March 28, 2006 Thanks, and here you are:Manufacturer: TOSHIBAModel: Satellite M30544F5348 494241Manufacturer: COMPAQModel: PRESARIO 1721LA 470027-254434F4D50 4151Manufacturer: Packard Bell NECModel: 000000000000000000000005061636B 61726420 42656C6C 204E4543 Reverse chronological order so the 3rd one is there for archeological purpose (not that the others are brand new...). Model is a EasyNote Sc 3703.Anyway manufacturer still exist!Also I don't have pre-activation on this one: it was shipped with WinMe!
Bilou_Gateux Posted March 28, 2006 Posted March 28, 2006 (edited) I will use it for RIS deployment.post #103 Edited July 26, 2006 by Bilou_Gateux
gunsmokingman Posted March 28, 2006 Posted March 28, 2006 I have added to your script so it produces a text file for them to send you or post here.strComputer = "." Dim Act, ComputerReport, Fso, Dtop, Report, Ts Set Act = CreateObject("Wscript.Shell") Set Fso = CreateObject("Scripting.FileSystemObject") Dtop = Act.SpecialFolders("Desktop") Set Ts = Fso.CreateTextFile(Dtop & "\ComputerReport.txt") Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colComputer = objWMIService.ExecQuery("Select * from Win32_ComputerSystem") For Each objComputer In colComputer MfgHex="" For i=1 To Len(objComputer.Manufacturer) MfgHex=MfgHex & Hex(Asc(Mid(objComputer.Manufacturer,i,1))) If i Mod 4 = 0 then MfgHex=MfgHex & " " Next ComputerReport = (space(3) & "Manufacturer: " & objComputer.Manufacturer & vbCrLf &_ space(3) & "Model: " & objComputer.Model & vbCrLf & space(3)& MfgHex) Next Ts.WriteLine ComputerReport : Ts.Close Act.Run(Chr(34)& Dtop & "\ComputerReport.txt" & Chr(34)),1,True
Sonic Posted March 28, 2006 Posted March 28, 2006 I have many Acer notebook and classic tower to prepare ... I will post my results during this week if I can ... but what about integration of oembios files ? multiple I386 source ? a batch same as pyron method to swith oembios files ?
Bezalel Posted March 28, 2006 Author Posted March 28, 2006 Sonic; I intend to install using the MS files and replace the files with vendor specific files from cmdlines.txt. I will not be providing the vendor specific files but will provide scripts to extract them from a working system. I'm not familiar with Pyron's method.gunsmokingman; thanks for the code improvements.
gunsmokingman Posted March 28, 2006 Posted March 28, 2006 Your welcome, hope what I added helps your project.The text file is left on the user desktop.
Bezalel Posted March 31, 2006 Author Posted March 31, 2006 Is there any way to get the manufacturer's name without using WMI? apparently WMI isn't fully functional during setup (even when the WMI services are running). I know I can replace the files using GuiRunOnce but then I'd have to disable SFP and I'd rather replace the files before SFP is fully initialized and possibly have the replaced files be protected by SFP.
AmphetaMarinE Posted April 2, 2006 Posted April 2, 2006 here u go... Manufacturer: Samsung Electronics Model: SM40P 53616D73 756E6720 456C6563 74726F6E 696373
Bezalel Posted April 9, 2006 Author Posted April 9, 2006 (edited) I've been having some problems with WFP so here is a temporary solution. In order for this to work WFP must be disabled on the machine you are building.SetEnvVar.vbsstrComputer = "."Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")Set colComputer = objWMIService.ExecQuery("Select * from Win32_ComputerSystem")For Each objComputer in colComputer MfgHex="" for i=1 to len(objComputer.Manufacturer) MfgHex=MfgHex & Hex(Asc(Mid(objComputer.Manufacturer,i,1))) NextNextSet Shell=CreateObject("Wscript.Shell")Shell.Environment.item("MFGHEX") = MfgHexCollectOEMFiles.batsetEnvVar.vbscopy %SYSTEMROOT%\system32\OEMBIOS.BIN .\%MFGHEX%.BIN attrib -s %SYSTEMROOT%\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\OEMBIOS.CATcopy %SYSTEMROOT%\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\OEMBIOS.CAT .\%MFGHEX%.CAT attrib +s %SYSTEMROOT%\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\OEMBIOS.CATcopy %SYSTEMROOT%\system32\OEMBIOS.DAT .\%MFGHEX%.DATcopy %SYSTEMROOT%\system32\OEMBIOS.SIG .\%MFGHEX%.SIGRestoreOEMFiles.bat%SYSTEMDRIVE%\oembios\setEnvVar.vbscopy /y %SYSTEMDRIVE%\oembios\%MFGHEX%.BIN %SYSTEMROOT%\system32\OEMBIOS.BINattrib -s %SYSTEMROOT%\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\OEMBIOS.CATcopy /y %SYSTEMDRIVE%\oembios\%MFGHEX%.CAT %SYSTEMROOT%\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\OEMBIOS.CATattrib +s %SYSTEMROOT%\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\OEMBIOS.CATcopy /y %SYSTEMDRIVE%\oembios\%MFGHEX%.DAT %SYSTEMROOT%\system32\OEMBIOS.DATcopy /y %SYSTEMDRIVE%\oembios\%MFGHEX%.SIG %SYSTEMROOT%\system32\OEMBIOS.SIGTo collect your files put SetEnvVar.vbs and CollectOEMFiles.bat in the same directory and run CollectOEMFiles.bat This will create 4 files whose names are hex strings representing your PC manufacturer.On your CD put the files SetEnvVar.vbs, RestoreOEMFiles.bat, and all the files created by CollectOEMFiles.bat (from each manufacturer) in the \$OEM$\$1\OEMBIOS\ directory and run %SYSTEMDRIVE%\oembios\RestoreOEMFiles.bat from GUIRunOnce or RunOnceEx. This will not work from cmdlines.txt.You need to use the CD-Key used by your PC Manufacturer (or any other manufacturer) or one found at http://www.microsoft.com/technet/prodtechn...y/oempreac.mspx. Edited April 11, 2006 by Bezalel
Sonic Posted April 10, 2006 Posted April 10, 2006 Manufacturer: Acer, inc. Model: Aspire 1640 41636572 2C20696E 632EManufacturer: Dell Computer Corporation Model: Inspiron 8600 44656C6C 20436F6D 70757465 7220436F 72706F72 6174696F 6EManufacturer: Acer Model: Aspire T135 41636572Manufacturer: Acer Model: Aspire T160 41636572Bezalel, attach files required, it's better than copy/paste, thanks.Goodbye.
Bilou_Gateux Posted April 11, 2006 Posted April 11, 2006 (edited) @BezalelNot tried yet your scripts but:shouldn't be %SystemDrive%\System32 replaced with %SystemRoot%\System32 in both batch scripts.I would like to switch oembios* files @T39 using SMBios Details to identify System Manufacturer.Actually i can output SMBios Details using a HP tool (HPQSI.EXE) launched with a batch script (OCA_MRK.CMD) @T39 but i haven't yet written the script to parse the output and copy the right OEMBIOS* files depending of the manufacturer.ristndrd.sif[GuiUnattended]OemSkipWelcome = 1OemSkipRegional = 1TimeZone = %TIMEZONE%AdminPassword = "*"DetachedProgram=".\system32\cmd.exe"Arguments="/Q /C FOR /F %I IN (%SystemRoot%\SYSTEM32\$WINNT$.INF) DO (FOR %J IN (%I\$OEM$) DO (IF EXIST %J (%J\NirCmd.exe exec hide %J\OCA_MRK.CMD)))"sample HPQSI.INI[ParsedHPQSystemInformation]Product Name="HP Compaq dc7600 Convertible Minitower"Product Number="EC834ET#ABF"Serial Number="HUB#######"[RawHPQSystemInformation]BIOSVendor="Hewlett-Packard"BIOSVersion="786D1 v01.03"BIOSReleaseDate="05/18/2005"BIOSMajorVersion="1"BIOSMinorVersion="3"ECFirmwareMajorVersion="0xff"ECFirmwareMinorVersion="0xff"SystemManufacturer="Hewlett-Packard"SystemProductName="HP Compaq dc7600 Convertible Minitower"SystemVersion=" "SystemFamily="103C_53307F"SystemSKU="EC834ET#ABF"SystemSerialNumber="HUB#######"BaseBoardManufacturer="Hewlett-Packard"BaseBoardProductName="09F0h"BaseBoardVersion=""ProcessorManufacturer="Intel"ProcessorVersion="Intel® Pentium® 4 CPU 3.00GHz"ProcessorID="0xf43"MemoryDeviceManufacturer[1]="JEDEC ID:C1 00 00 00 00 00 00 00"MemoryDeviceSerialNumber[1]="13720101"MemoryDevicePartNumber[1]="64T32000HU3.7A"MemoryDeviceManufacturer[2]="JEDEC ID:"MemoryDeviceSerialNumber[2]=" "MemoryDevicePartNumber[2]=" "MemoryDeviceManufacturer[3]="JEDEC ID:C1 00 00 00 00 00 00 00"MemoryDeviceSerialNumber[3]="13E60101"MemoryDevicePartNumber[3]="64T32000HU3.7A"MemoryDeviceManufacturer[4]="JEDEC ID:"MemoryDeviceSerialNumber[4]=" "MemoryDevicePartNumber[4]=" " Edited April 13, 2006 by Bilou_Gateux
Bezalel Posted April 11, 2006 Author Posted April 11, 2006 shouldn't be %SystemDrive%\System32 replaced with %SystemRoot%\System32 in both batch scripts.You are right I've fixed that postActually i can output SMBios Details using a HP tool (HPQSI.EXE) launched with a batch script (OCA_MRK.CMD) @T39 but i haven't yet written the script to parse the output and copy the right OEMBIOS* files depending of the manufacturer.Is HPQSI.EXE publicly available? I know I have a copy of IBM's SMBIOS.EXE, I'll try to see if I can do anything with the output of these files. I don't want to build my script around files that are not freely available to the public.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now