Jump to content


anyweb

how can I change the computername in Zero Touch

Recommended Posts

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.

 

task_sequence.JPG

 

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.

 

new_computer_only.JPG

 

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."

Else

Set objOSD = CreateObject("OSD.Environment")

objOSD("OSDNEWMACHINENAME") = strComputerName

Set objOSD = Nothing

Exit Do

End If

Loop

 

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.

 

top_of_list.JPG

 

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
Guest
This topic is now closed to further replies.

×
×
  • Create New...