Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

Multi Manufacturer Pre-Activation

* * * * * 1 votes

  • Please log in to reply
553 replies to this topic

#1
Bezalel

Bezalel

    Senior Member

  • Member
  • PipPipPipPip
  • 591 posts
  • Joined 11-October 05
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)
Next
WScript.Echo ComputerReport

Sample output

Manufacturer: Dell Computer Corp.
Model: PowerVault 715N
44656C6C 20436F6D 70757465 7220436F 72702E


This code hase been modified by gunsmokingman to output the report to a text file.

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

Edited by Bezalel, 28 March 2006 - 10:40 AM.



How to remove advertisement from MSFN

#2
Djé

Djé

    accent artist

  • Member
  • PipPipPip
  • 359 posts
  • Joined 10-January 06
Nice idea :thumbup
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?
Those who do not learn from History are doomed to repeatedly fail their History exams.

#3
Bezalel

Bezalel

    Senior Member

  • Member
  • PipPipPipPip
  • 591 posts
  • Joined 11-October 05
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 file

cscript /nologo GetMfgName.vbs >> MfgName.txt


#4
Djé

Djé

    accent artist

  • Member
  • PipPipPip
  • 359 posts
  • Joined 10-January 06
Thanks, and here you are:

Manufacturer: TOSHIBA
Model: Satellite M30
544F5348 494241

Manufacturer: COMPAQ
Model: PRESARIO 1721LA 470027-254
434F4D50 4151

Manufacturer: Packard Bell NEC
Model: 00000000000000000000000
5061636B 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!
Those who do not learn from History are doomed to repeatedly fail their History exams.

#5
Bilou_Gateux

Bilou_Gateux

    Powered by Windows Embedded

  • Member
  • PipPipPipPipPip
  • 768 posts
  • Joined 03-January 04
:thumbup
I will use it for RIS deployment.

post #103

Edited by Bilou_Gateux, 26 July 2006 - 10:07 AM.

OS Version = 5.1.2600 Service Pack 3
Platform ID = 2 (NT)
Service Pack = 3.0
Suite = 0x0140
Product Type = 1
Architecture = x86

#6
gunsmokingman

gunsmokingman

    MSFN Master

  • Super Moderator
  • 2,418 posts
  • Joined 02-August 03
  • OS:none specified
  • Country: Country Flag
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




GunSmokingMan



#7
Sonic

Sonic

    Sonic

  • Patrons
  • 1,603 posts
  • Joined 04-December 03
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 ?

#8
Bezalel

Bezalel

    Senior Member

  • Member
  • PipPipPipPip
  • 591 posts
  • Joined 11-October 05
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.

#9
gunsmokingman

gunsmokingman

    MSFN Master

  • Super Moderator
  • 2,418 posts
  • Joined 02-August 03
  • OS:none specified
  • Country: Country Flag
Your welcome, hope what I added helps your project.
The text file is left on the user desktop.


GunSmokingMan



#10
Bezalel

Bezalel

    Senior Member

  • Member
  • PipPipPipPip
  • 591 posts
  • Joined 11-October 05
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.

#11
AmphetaMarinE

AmphetaMarinE

    Newbie

  • Member
  • 14 posts
  • Joined 28-May 05
here u go...
Manufacturer: Samsung Electronics
Model: SM40P
53616D73 756E6720 456C6563 74726F6E 696373

#12
Bezalel

Bezalel

    Senior Member

  • Member
  • PipPipPipPip
  • 591 posts
  • Joined 11-October 05
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.vbs
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)))
	Next
Next
Set Shell=CreateObject("Wscript.Shell")
Shell.Environment.item("MFGHEX") = MfgHex

CollectOEMFiles.bat
setEnvVar.vbs
copy %SYSTEMROOT%\system32\OEMBIOS.BIN .\%MFGHEX%.BIN 
attrib -s %SYSTEMROOT%\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\OEMBIOS.CAT
copy %SYSTEMROOT%\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\OEMBIOS.CAT .\%MFGHEX%.CAT 
attrib +s %SYSTEMROOT%\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\OEMBIOS.CAT
copy %SYSTEMROOT%\system32\OEMBIOS.DAT .\%MFGHEX%.DAT
copy %SYSTEMROOT%\system32\OEMBIOS.SIG .\%MFGHEX%.SIG

RestoreOEMFiles.bat
%SYSTEMDRIVE%\oembios\setEnvVar.vbs
copy /y %SYSTEMDRIVE%\oembios\%MFGHEX%.BIN %SYSTEMROOT%\system32\OEMBIOS.BIN
attrib -s %SYSTEMROOT%\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\OEMBIOS.CAT
copy /y %SYSTEMDRIVE%\oembios\%MFGHEX%.CAT %SYSTEMROOT%\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\OEMBIOS.CAT
attrib +s %SYSTEMROOT%\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\OEMBIOS.CAT
copy /y %SYSTEMDRIVE%\oembios\%MFGHEX%.DAT %SYSTEMROOT%\system32\OEMBIOS.DAT
copy /y %SYSTEMDRIVE%\oembios\%MFGHEX%.SIG %SYSTEMROOT%\system32\OEMBIOS.SIG

To 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...y/oempreac.mspx.

Edited by Bezalel, 11 April 2006 - 05:52 AM.


#13
Sonic

Sonic

    Sonic

  • Patrons
  • 1,603 posts
  • Joined 04-December 03
Manufacturer: Acer, inc.
   Model: Aspire 1640	 
   41636572 2C20696E 632E
Manufacturer: Dell Computer Corporation
   Model: Inspiron 8600				   
   44656C6C 20436F6D 70757465 7220436F 72706F72 6174696F 6E
Manufacturer: Acer
   Model: Aspire T135
   41636572
Manufacturer: Acer
   Model: Aspire T160
   41636572

Bezalel, attach files required, it's better than copy/paste, thanks.

Goodbye.

#14
Bilou_Gateux

Bilou_Gateux

    Powered by Windows Embedded

  • Member
  • PipPipPipPipPip
  • 768 posts
  • Joined 03-January 04
@Bezalel



Not 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 = 1
OemSkipRegional = 1
TimeZone = %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 by Bilou_Gateux, 13 April 2006 - 01:48 AM.

OS Version = 5.1.2600 Service Pack 3
Platform ID = 2 (NT)
Service Pack = 3.0
Suite = 0x0140
Product Type = 1
Architecture = x86

#15
Bezalel

Bezalel

    Senior Member

  • Member
  • PipPipPipPip
  • 591 posts
  • Joined 11-October 05

shouldn't be %SystemDrive%\System32 replaced with %SystemRoot%\System32 in both batch scripts.

You are right I've fixed that post

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.

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.

#16
Bilou_Gateux

Bilou_Gateux

    Powered by Windows Embedded

  • Member
  • PipPipPipPipPip
  • 768 posts
  • Joined 03-January 04

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.





:no:

We can use another command line tool call GetSys.exe, which is part of 'Mitec System Information Component Suite'.



ReadMe.txt

MSICS is freeware.

Sources are available on purchase/registration. Price is 110 euro (EUR).
For registration details see Order.txt file in this package.

Distribution pack:
------------------

The zip file has subdirectories in it. You must use the pkunzip -d option
to restore this directory tree or you will have problems because the files
will not be in their proper subdirectories.

This is the subdirectory layout:

.\ Info directory
.\apps Applications written using this component
.\demos Sample applications
.\dll MSICS.DLL library for using MSI data from any app
.\help HTML Help file
.\D5 compiled units containing components and packages for installing for Delphi 5 (not in registered version)
.\D6 compiled units containing components and packages for installing for Delphi 6 (not in registered version)
.\D7 compiled units containing components and packages for installing for Delphi 7 (not in registered version)
.\BDS3 compiled units containing components and packages for installing for Delphi 2005 (not in registered version)
.\BDS4 compiled units containing components and packages for installing for Delphi 2006 (not in registered version)
.\Sources source files (only in registered version)




You can get it by downloading the full package, extract and grab the exe in \Apps\GetSys folder.
OS Version = 5.1.2600 Service Pack 3
Platform ID = 2 (NT)
Service Pack = 3.0
Suite = 0x0140
Product Type = 1
Architecture = x86

#17
Bezalel

Bezalel

    Senior Member

  • Member
  • PipPipPipPip
  • 591 posts
  • Joined 11-October 05

We can use another command line tool call GetSys.exe, which is part of 'Mitec System Information Component Suite'.


Have you used this program during setup? The output looks more like WMI than SMBIOS.

#18
RogueSpear

RogueSpear

    OS: SimplyMEPIS

  • MSFN Sponsor
  • 1,529 posts
  • Joined 18-September 04

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 file


I'm a little late coming to the thread, but if you still have any interest in utilizing the clipboard from a VBscript, just use AutoItX.

Set ai = WScript.CreateObject("AutoItX3.Control")
text = ai.ClipGet()
WScript.Echo "Clipboard contains:" & text

You just need to have AutoItX.dll registered.

#19
Bezalel

Bezalel

    Senior Member

  • Member
  • PipPipPipPip
  • 591 posts
  • Joined 11-October 05

I'm a little late coming to the thread, but if you still have any interest in utilizing the clipboard from a VBscript, just use AutoItX.

Set ai = WScript.CreateObject("AutoItX3.Control")
text = ai.ClipGet()
WScript.Echo "Clipboard contains:" & text

You just need to have AutoItX.dll registered.


Thanks, but I prefer to use built-in features of the OS or stand-alone applications for OS deployment and management.

#20
RogueSpear

RogueSpear

    OS: SimplyMEPIS

  • MSFN Sponsor
  • 1,529 posts
  • Joined 18-September 04
Just lettin ya know. You never know when something like that might come in handy ;)

Edited by RogueSpear, 11 April 2006 - 12:36 PM.


#21
Bilou_Gateux

Bilou_Gateux

    Powered by Windows Embedded

  • Member
  • PipPipPipPipPip
  • 768 posts
  • Joined 03-January 04

Have you used this program during setup? The output looks more like WMI than SMBIOS.





Yes i've launched Getsys.exe @T39. Here the output:

MiTeC System Information Utility 10.2.0 - Copyright © 1997-2006 Michal Mutl
Type /? for options

SYSTEM OVERVIEW...OK
Machine: MACHINENAME
System : PC multiprocesseur ACPI
Model : Hewlett-Packard HP Compaq dc7600 Convertible Minitower
UpTime : 2 Minutes, 47 Seconds.
-------------------------------------------------------------------------------
CPU : 1 x Intel Pentium 4 - 2990 MHz
Cache: 16 KB L1 + 2048 KB L2 + 0 KB L3
-------------------------------------------------------------------------------
Mainboard: Hewlett-Packard 09F0h
Memory : 503 MB
-------------------------------------------------------------------------------
Operating system: Windows XP Professional [5.1.2600]Service pack : 2.0
Logged user : SYSTEM
-------------------------------------------------------------------------------
Display adapter: Intel® 82945G Express Chipset Family
Memory : 128 MB
-------------------------------------------------------------------------------
Fixed : Promise 1X2 Mirror/RAID - 76316 MB (SCSI)
C: (Primary NTFS - 76308 MB)
DVD : LITE-ON DVD SOHD-167T - 0 MB (ATAPI)
D:
-------------------------------------------------------------------------------
Keyboard:
-------------------------------------------------------------------------------
Mouse:
-------------------------------------------------------------------------------
Default printer:
-------------------------------------------------------------------------------




As you can see, @T39 we don't get full infos about PCI PnP Devices because they're not yet installed.
OS Version = 5.1.2600 Service Pack 3
Platform ID = 2 (NT)
Service Pack = 3.0
Suite = 0x0140
Product Type = 1
Architecture = x86

#22
Bezalel

Bezalel

    Senior Member

  • Member
  • PipPipPipPip
  • 591 posts
  • Joined 11-October 05
I took a look a GetSys and decided not to use it because it merges the manufacturer and model into 1 long string. I've decided to use IBM's SMBIOS but need some help extracting the manufacturer's name from the output file.

#23
Djé

Djé

    accent artist

  • Member
  • PipPipPip
  • 359 posts
  • Joined 10-January 06
Do you mean something like indy_dba's way in this post?

If you need further help, I would be glad to give a hand.
Those who do not learn from History are doomed to repeatedly fail their History exams.

#24
Bigbrit

Bigbrit

    Hardware Tech.

  • Member
  • PipPip
  • 106 posts
  • Joined 11-May 05
Manufacturer: Elitegroup Co.
Model: i-Buddie
456C6974 6567726F 75702043 6F2E2020 20202020 20202020 20202020 20202020

Hope this helps

:hello:
Flash and animated signatures and avatars are not permitted.

#25
Bezalel

Bezalel

    Senior Member

  • Member
  • PipPipPipPip
  • 591 posts
  • Joined 11-October 05

Do you mean something like indy_dba's way in this post?

If you need further help, I would be glad to give a hand.


With indy_dba's method I would need to hardcode every manufacturer's name in my script or have every user modify their own scripts based on which computers they own. (Even worse the script might see a component manufacturer's name and miskake it for the system manufacturer.)

This is what I need my script to do:
Run SMBIOS (I think /G) and redirect the output to a text file
Search the output file for the "System Information" section
Search the "System Information" section for the "Manufacturer" line
Convert the manufacturer string into hex and replace the OEMBIOS files with files named with the hex string.

My script would not have to be modified when you by another PC from a a new manufacturer all you have to do is collect the OEMBIOS files from your new computer rename them with the manufacturer's hex string (I've already written these scripts) and drop the files onto your CD.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN