Pulling serial no from BIOS into Sysprep
We have to use an archaic method of PC deployment at my current place of work due to geographic network limitations.
Currently we configure a PC to a bare spec without Office or specialist software, Sysprep it and image it out from portable HDD. I should add that the network is tied down to mac address and auto joining the domain isn't possible.
I've fully automated sysprep, apart from the PC name, which on our exclusively Dell machines, is the service tag.
What I want to do is, pull the service tag from the bios and use it as the PC name silently during the sysprep process. Anyone have any ideas?
I have this script which get's the service tag:
' Set Local Computer
Dim colItems, Computer, objItem, Ts, Z1
Computer = "."
Dim Act :Set Act = CreateObject("WScript.Shell")
Dim Fso :Set Fso = CreateObject("Scripting.FileSystemObject")
Dim Txt :Txt = Act.SpecialFolders("Desktop") & "\Bios.txt"
Dim Wmi :Set Wmi = GetObject("winmgmts:\\" & Computer & "\root\CIMV2")
Set Ts = Fso.CreateTextFile(Txt)
Set colItems = Wmi.ExecQuery("SELECT * FROM Win32_BIOS",,48)
For Each objItem in colItems
Act.Run(Chr(34) & Txt & Chr(34)),1,True