Thank you Peter.
I've stumbled upon the following
--- This is a vbs script sets the computername variable to the serial number
--- Set SWBemlocator = CreateObject("WbemScripting.SWbemLocator") Set objWMIService = SWBemlocator.ConnectServer(strComputer,"root\CIMV2",UserName,Password) Set colItems = objWMIService.ExecQuery("Select * from Win32_BIOS",,48) Set env = CreateObject("Microsoft.SMS.TSEnvironment")
For Each objItem in colItems env("OSDComputerName") = objItem.SerialNumber Next
The next vbs script I found presents a 'computername dialogue box' -
set env = CreateObject("Microsoft.SMS.TSEnvironment")
Name = inputbox("Enter the name for the new computer" ,"Prompt for Computer Name:",env("_SMSTSMachineName"),400,0)
env("OSDComputerName") = Name
****This prompting script- prepopulates the 'computername' field with the 'current' computer name. ----
I'm trying to combine the two vbs scripts such that in the vbs script which prompts for the computername (that has the current computername prepopulated) instead prepopulates with the serial number.
Given my lack of ability and knowledge of how vbs scripting works, I was hoping the community could help.
Thanks for any assistance and guidance.