Hi folks! Does anyone here know how to have an image automatically detect serial number and also use that serial number to name the computer, instead of prompting the user for the computer name during mini setup?
0 Comments   [ - ] Hide Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity


Old'ish post but anyway I'm new here......

very easy to do but your workstation BIOS has to support it and you may have to alter the way your minisetup runs. I've been doing this for 3 or so years now and it works sweetly on NT / 2000 / XP providing you have WMI and WSH installed.

For starters copy and paste the code below into a text file on your desktop, rename it to something.vbs and see if you get anything returned on execution. If you do there's a whole heap of instruction on the MS Technet site about renaming comps, joining them to domains etc etc via scripts.

On Error Resume Next
Dim strTag

strComputer = "."
vbCRLF = chr(13)

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_BIOS",,48)
For Each objItem in colItems
strTag = objItem.SerialNumber

set oWSHShell = WScript.CreateObject("WScript.Shell")

msgbox strTag

Answered 01/27/2005 by: wildpitch
Yellow Belt

Please log in to comment