Hello, i'm not sure that LANDesk default WinPE include the scripting-package which allows VBS to run ?
But you could try this : http://community.landesk.com/support/docs/DOC-26995
I myself use an autoit script for this purpose.
Thanks for replying but I already run a VBS in WinPE for automatic naming of computers. It uses the gatway for site code, serial or service tag then L or D with battery type that uses WMI.
1 of 1 people found this helpful
Ok, then here a quick example of what you can do :
strInput = InputBox( "Computer Name:" )
Const ForReading = 1
Const ForWriting = 2
UnattendFile = "c:\windows\panther\unattend.xml"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(UnattendFile, ForReading)
strText = objFile.ReadAll
strNewText = Replace(strText, "<ComputerName>%ldHostname%</ComputerName>", "<ComputerName>"& strInput &"</ComputerName>")
Set objFile = objFSO.OpenTextFile(UnattendFile, ForWriting)
It might need some changes, it depends of your unattend.xml and it's designed to work with WSCRIPT, not CSCRIPT.
Thank you. Your post pointed me in the right direction. Got it finally.