What variables do I need to define in the script that I use to choose the OS program for deploying an OS image via the Microsoft Systems Management Server (SMS) OS Deployment Feature Pack?

A. You need to set the OSDINSTALLPACKAGE, OSDINSTALLPROGRAM, and the OSDINSTALLSILENT variables. If the installation is a zero-touch installation (i.e., no user input), you also need to set the OSDNEWMACHINENAME variable.

The OSDINSTALLPACKAGE variable isn't the "friendly" name of the package; rather, it's the SMS package ID. For example, if my SMS site is named ZTI, the package ID might be ZTI00007. You can view package IDs by opening the SMS Administrator Console and clicking Image Packages, as the figure shows.

The OSDINSTALLPROGRAM variable is the actual name of the program defined for the specified package (e.g., WindowsXPProSP2Base). Set the OSDINSTALLSILENT variable to 1 for a silent installation. The following sample script, which you can download at http://www.windowsitpro.com/content/content/45804/CreateOSDObject.zip sets the variables you need. In the real world, you'd probably perform some type of lookup in the script to determine the values.

' Create the OSD Environment Object
Dim env : set env = CreateObject("OSD.Environment")
env("OSDNEWMACHINENAME") = "Computer"
env("OSDINSTALLPACKAGE") = "ZTI00007"
env("OSDINSTALLPROGRAM") = "WindowsXPProSP2Base"
env("OSDINSTALLSILENT") = "1"
WScript.Quit(0)

The WScript.Quit(0) line is important because it tells the OS Deployment Feature Pack that the script exited without an error condition. The SMS OS Deployment Feature Pack documentation lists all the relevant SMS OS Deployment Feature Pack environment variables.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish