Tip

Reducing user input during the Sysprep process

Dan Thomson, Contributor, myITforum.com

I was thinking the other day of how to better automate our computer imaging process so that input from administrators could be further reduced. One area that usually requires input during the Sysprep process is the configuration of the computer name, TCP/IP settings and domain membership. I thought it would be great if I could store all this information in a network database that would be queried during the Sysprep process.

The Plan: Storing the configuration data

  • Create an Access database, which contains information listed in the field design shown below.
  • Populate the database with current configuration data for existing systems.
  • Add configuration data for new systems as they arrive.

The Access database has the following fields:

To avoid possible duplicate entries, I set the SerialNumber field Indexed attribute to Yes (No Duplicates)

Sysprep:

  • Prior to running Sysprep, the master system is configured to use DHCP.
  • The Sysprep.inf answer file will be configured to automatically generate a random name for the computer.
  • The script referenced in this article will be run at the end of the Sysprep process via the cmdlines.txt file or the GUIRunOnce entry in the Sysprep.inf file.
  • When the script runs, it will use the local systems serial number in a query on the database, which contains the configuration data.
  • Once the configuration data is retrieved, the script will rename the

    Requires Free Membership to View

  • computer, set TCP/IP settings, join a domain and then initiate a system reboot.

Results:

  • When a system is re-imaged, no input is required from the technician during the Sysprep process.
  • The system will automatically configure itself using the configuration data retrieved from the database and initiate a reboot.

Notes:

  • Certain procedures in the VBS script code are Windows XP specific. For samples on how to accomplish similar tasks on Windows 2000, see Janis Keim's article, SysPrep Phase III -- Rename PC & join domains automatically.
  • The VBS script code, database template and a sample log file can be downloaded here --> 9385ConfigMe.zip.
  • I have tested this process using a Windows XP client and Windows Server 2003 on a small test network and feel pretty comfortable. However, I suggest fully evaluating the process prior to using it on production systems.
  • As detailed in a recent Scripting Guys Webcast, scripters can also use Excel and text files to store and retrieve data. For more information on using other file formats, visit the Microsoft TechNet Script Center or the Scripting Guys Webcasts Web site for sample code.
  • This code can be further expanded to include items such as local and network printer connections.
  • If there are any questions on the content of this article, please post to the Article Discussions forum or the VB Script forum. This will allow others to also benefit from the discussion.

BIO: Dan Thomson was first introduced to computers 15 years ago when he became a machinist in 1988. Dan graduated to a PC and gradually worked his way through learning various CAD and CAD/CAM programs. He eventually earned his MCSE 4.0 and A+ certifications and is currently studying for a Bachelors Degree in Computer Science.

Related Links:

Windows XP: Automating deployment using Sysprep – by Dan Thomson

SysPrep – by Janis Keim

SysPrep Phase II -- Adding New Hardware – by Janis Keim

SysPrep Phase III -- Rename PC & join domains automatically – by Janis Keim

Developing the perfect clone image – by Sean Cottrell

Auto-Run SysPrep – by Rod Trent


This article first appeared in myITforum, the premier online destination for IT professionals responsible for managing their corporations' Microsoft Windows systems. The centerpiece of myITforum.com is a collection of member forums where IT professionals actively exchange technical tips, share their expertise, and download utilities that help them better manage their Windows environments, specifically Microsoft Systems Management Server (SMS). It is part of the TechTarget network of Web sites. To register for the site and sign up for the myITforum daily newsletter, click here.

This was first published in May 2004

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.