Building a Windows 7 Image - Question

Neutron1998

Distinguished
Aug 27, 2007
14
0
18,510
I'm building a Windows 7 image from scratch. Does anyone know how I can get the OEM info to display the make, model, and serial number of the PC in the System Properties automatically no matter which system I send this image to?

I know you can set them manually in the registry, but I want to know if it's possible to pull this from the PC it's installed on.

 
Sysprep, specifically the Sysprep Answer File

http://technet.microsoft.com/en-us/library/dd744512(WS.10).aspx

"Using Answer Files with Sysprep
You can use an answer file with Sysprep to configure unattended Setup settings. The following sections describe some of the considerations and processes for using answer files with Sysprep.

Applying Settings in the generalize, auditSystem, and auditUser Configuration Passes
Not all configuration passes run during Windows Setup. Some configuration passes are available only when you run Sysprep. The generalize, auditSystem and auditUser configuration passes are available only by running Sysprep. If you add settings to your answer file in these configuration passes, you must run Sysprep to apply these settings:

To apply the settings in the auditSystem and auditUser configuration passes, you must boot to audit mode by using the sysprep/audit command.


To apply the settings in the generalize configuration pass, you must use the sysprep/generalize command. The generalize configuration pass removes the system-specific settings, enabling you to deploy the same image for multiple computers.


For more information, see How Configuration Passes Work. For more information about Sysprep command-line options, see Sysprep Command-Line Syntax.

Caching Answer Files to the Computer
If you install Windows by using an answer file, that answer file is cached to the system so when subsequent configuration passes run, settings in the answer file are applied to the system.

Because this answer file is cached, when you run the Sysprep command, settings in the cached answer file are applied. If you use the settings in a different answer file, you can specify a separate Unattend.xml file by using the sysprep /unattend:filename option. For more information, see Sysprep Command-Line Syntax.

For more information about using implicit answer file search, see How Windows Setup Works.
"
 
I don't see how to do this using sysprep.

I just want to be able to add this information along with the service tag of the machine so that each system will show this in System Properties for windows 7 in case they need support.
 
I see what you want to do, you want the system info to show up that's unique to each computer. You'd need to write a script that will pull the system info and add it to the registry. I don't think you can use variables in the registry (like %serialnumber%).

http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/a-simple-way-to-write-to-the-registry-with-vbscript/

This should get you some system info:

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery( _
"SELECT * FROM Win32_SystemEnclosure",,48)
For Each objItem in colItems
Wscript.Echo "-----------------------------------"
Wscript.Echo "Win32_SystemEnclosure instance"
Wscript.Echo "-----------------------------------"
If isNull(objItem.ChassisTypes) Then
Wscript.Echo "ChassisTypes: "
Else
Wscript.Echo "ChassisTypes: " & Join(objItem.ChassisTypes, ",")
End If
Wscript.Echo "Manufacturer: " & objItem.Manufacturer
Wscript.Echo "Model: " & objItem.Model
Wscript.Echo "OtherIdentifyingInfo: " & objItem.OtherIdentifyingInfo
Wscript.Echo "PartNumber: " & objItem.PartNumber
Wscript.Echo "SerialNumber: " & objItem.SerialNumber
Wscript.Echo "SMBIOSAssetTag: " & objItem.SMBIOSAssetTag
Next

Open in New Window


 

TRENDING THREADS