Quickly Find a Windows Computer’s Sysprep Identification String

At work, I’m in a situation where we have over 1,000 computers to manage. Over the years, we’ve gone through several different versions of a base image of Windows XP created with Sysprep which we put on all of the new computers that come in. When we’re out in the field troubleshooting a problem on a computer, it’s nice to know which image was used on that computer. Previously, I was having to open regedit and navigate to HKEY_LOCAL_MACHINE\SYSTEM\Setup\OemDuplicatorString. This got old real fast, so I wrote a quick VBScript to display it:

Const HKEY_LOCAL_MACHINE = &H80000002

strComputer = "."
Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")

strKeyPath = "SYSTEM\Setup"
strValueName = "OEMDuplicatorString"
objRegistry.GetMultiStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,arrValues

If IsNull(arrValues) Then
	Wscript.Echo "This computer has no Sysprep identification string."
	Wscript.Echo "This computer's Sysprep identification string is:" & VbCr & VbCr & arrValues(0)
End If

Simply save that code as “Display Sysprep Identification String.vbs”! For an extremely detailed guide on how to use Sysprep, I recommend this one.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s