Jump to content

  • 0

how can I change the computername in Zero Touch


If you carry out a Zero Touch installation (as outlined here) the computername will remain the same as it was when you captured the original Vista image.


One way to change the computername is via a script, to add this script to the Zero Touch installation, we need to start up Deployment Workbench and click on the Builds option in the left pane. Right click on our Zero Touch build and choose properties, then choose Task Sequence in the available tabs.




Within the task sequencer tree, click on the + beside the Preinstall section to expand it, and then expand the New Computer Only option after that.




Now click on Add, and from the drop down menu select Task.


In the command line of the New Task paste in the following line


cscript.exe "%SCRIPTROOT%\RequestComputerName.vbs"


The actual contents of that script are located here


Option Explicit


Dim numCount

Dim strComputerName

Dim objOSD


Do While numCount = 0

strComputerName = InputBox ("Please enter a name for the new computer:","New Computer Name","Vista00",10,10)

If strComputerName = "" Then

Wscript.Echo "You must enter a computer name."


Set objOSD = CreateObject("OSD.Environment")

objOSD("OSDNEWMACHINENAME") = strComputerName

Set objOSD = Nothing

Exit Do

End If



Once done, rename the task to RequestComputerName and using the UP arrow in the Task Sequencer move the task up in the list so that it is the first command run.




This means that the script will only run if the machine is detected to be a new computer with no operating system installed.

Share this post

Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

This topic is now closed to further replies.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.