Jump to content


Setting Hostname before Applying Operating System

Recommended Posts

I have a working Online Windows 7 OSD with the Unknown Computers Collection in SCCM 2007 SP2. I want to make a Offline USB deployment. I want a script to prompt for a Hostname before the Applying Operating System in the TS. If someone can post step by step procedure. I tried the MDT computername.vbs but it did not work. Do I need to add a TS Variables?



Share this post

Link to post
Share on other sites

Not sure if this will help, but this is what i use for unknown computer support and works like a charm.




I do have a VBS script in a package and run it from the TS via a run command line like the tech article say's to do. I have tried the following script computername.vbs from MDT 2010 and it fails to run in the task sequence. I get an error that the oEnvironment variable has not been defined.


Option Explicit


Dim numCount

Dim strComputerName

Dim objOSD

Dim mname


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

if strComputerName = "" Then

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


oEnvironment.Item("OSDNEWMACHINENAME") = strComputerName

oEnvironment.Item("OSDCOMPUTERNAME") = strComputerName

End If

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...