SideBar    Using Setup Manager to Create a Sysprep.inf File
DOWNLOAD THE CODE:
Download the Code 38950.zip

The sysprep.inf file includes some other items that you should look at for their ability to streamline your imaging process and make it more effective. The UserData section lets you predefine answers to typical prompts during setup. Think of the time you'll save by not having to enter the product key each time. (Of course you still must comply with Microsoft's licensing requirements.) You can leave blank any values that you want to enter manually during Mini-Setup. If you want to share an image between multiprocessor and uniprocessor computers, you can do so by specifying either the UpdateHAL or UpdateUPHAL setting in the Unattended section. The Identification section lets you automate the process of joining a domain or workgroup. If you look at the sample sysprep.inf, you'll notice that both the DomainAdmin and DomainAdminPassword values are clear text. Because you can't encrypt this password as you can the local administrator password, you must create and specify an account that possesses only the rights necessary to add computers to the domain. Finally, use the OEMDuplicatorString setting in the GuiUnattended section to help you manage image file revisions. This setting stamps the value you provide (the string) into the registry of all systems built with that image. If you need to identify a system's source image for troubleshooting or tracking purposes, you can check the value of the HKEY_LOCAL_MACHINE\SYSTEM\Setup\OemDuplicatorString registry subkey to determine which image you used to build that system.

After honing your sysprep.inf file to perfection, you should consider the benefits that some of Sysprep's parameters offer for extending the usefulness of your images. If you still have to support legacy ISA devices, you can add the -pnp argument to the Sysprep command, which will enumerate non—Plug and Play (PnP) devices during Mini-Setup. The -factory argument lets you boot a machine into a state that lets you perform additional configuration, driver management, program installation, and testing. (The -factory option is used predominantly by OEMs or factory installers to gain more control over the end installation process.) After you run Sysprep in factory mode, you need to run Sysprep with the -reseal option to prepare for the image-creation process.

Automating Actions on the Target System
You can provide an additional level of flexibility in image-based deployments by automatically executing commands during or after running Mini-Setup. To install programs or run programs, batch files, or scripts after the Mini-Setup process finishes, you create entries in a special file named cmdlines.txt. If you need to install programs or run commands, scripts, programs, or batch files after the target system restarts, you create entries in the GuiRunOnce section of sysprep.inf.

Cmdlines.txt. The cmdlines.txt file should reside in the %SystemDrive%\Sysprep\i386\$oem$ directory. Listing 2 shows an example of a cmdlines.txt file that runs Sysprep with the -clean option as well as two other fictional commands. The format and use of cmdlines.txt is straightforward, but keep in mind the following caveats:

  • You must include the InstallFilesPath entry in the Unattended section of sysprep.inf that points to the location of the $oem$ folder.
  • All necessary files must reside on the hard disk because there's no guarantee of network connectivity.
  • If commands alter or create registry settings, the settings will be altered or created in the default user section of the registry and will apply to all new users.
  • You can't use cmdlines.txt to install applications that use Windows Installer (.msi packages).

GuiRunOnce. To run commands, batch files, or scripts after the target system restarts, you can create entries in the GuiRunOnce section of sysprep.inf. These entries will run the first time a user logs on to the system. As with cmdlines.txt, you need to keep in mind some rules and behaviors when using GuiRunOnce:

  • To process the GuiRunOnce entries you must enable Autologon. To do so, set AutoLogon=Yes in the GuiUnattended section.
  • You must enclose each command with quotation marks.
  • The commands in the GuiRunOnce section run under the security context of the logged-on user, which might be inadequate for installing applications.
  • You must suppress reboots to ensure that all specified commands will be executed. If a GuiRunOnce-launched program has options for rebooting the system (as many silent installations do), you must turn off the reboot option. If the system reboots, subsequent items in the GuiRunOnce list won't be executed.
  • GuiRunOnce doesn't support running applications that rely on the Windows Explorer shell (e.g., end-user applications).
  • For best results when installing multiple applications, use the Start command with the /wait option to keep installations from interfering with one another.

Imaging Software
Microsoft provides some excellent tools for assisting with image-based XP deployment, but you must use a third-party product to perform the disk imaging. My review of third-party imaging utilities "Disk-Imaging Solutions," Summer 2001, http://www.winnetmag.com, InstantDoc ID 20876, is somewhat dated, but you can read it to get a feel for how these utilities work and what features to look for. Although these tools keep evolving to automate various aspects of deployment, the primary functions they provide are capturing disk images to a file and downloading disk images from a file. When you have a reliable mechanism for performing the physical disk-imaging procedures, your entire deployment process will proceed more smoothly.

Deploy and Refine
Expect to revisit multiple times the contents of your images, your sysprep.inf file, and other processes you put in place for an image-based deployment. Often you need to try something before you know how it will behave in your environment. The best thing you can do is to learn from the mistakes and hiccups in your process, fix the problems, and try again. Every action that you can avoid or automate will pay dividends each time you use an image to deploy a new system.

End of Article

Prev. page     1 2 [3]     next page -->



You must log on before posting a comment.

If you don't have a username & password, please register now.

Reader Comments

Just to let you readers know. When setting up a syspreped image for windows 2000, using the XP setup manager tool you can specify all standard options rather than just the basic options with the win2k setup manager e.g. inserting Product keys.

Once you have run the xp setup manager from a non sysprep directory. e.g c:\xpsysprep copy the sysprep.inf file and the i386 from the xpsysprep directory and move it to the c:\sysprep directory and then run the sysprep.exe from a command prompt with the required switches.

I hope this helps new sysprepers

Andrew Barr

The more times you run sysprep on the same image, the more unstable it becomes. So always keep a unsyspreped copy of your first image. When you go from rev B of your image to rev C for example, you dont make all your changes to a rev b image and presto, you have rev c. You have to start with rev A, add all your changes from rev B and rev C. Another thing I have never seen documented is that some settings get removed from the default user profile during the sysprep process. Need to specify IPX frame types for instance, want the "show connected icon" in sys tray? fagetaboutit! you'll have to do it on each new machine created from the image. And heres a good one, even though the mini-setup asks you (depending on how you set up your sysprep.inf) what the local admin password is supposed to be, if the local admin pw wasnt cleared before you sysprep'd, it will ignore whatever you tell it to be and your local admin pw will still be what ever it was on the original machine.

Learned The Hard Way

Thank you for this interesting article. I did not know that "sysprep -clean" was necessary to avoid loading of every mass storage driver in WinXP. I thought that "sysprep -clean" only was appliable on Win2k. Is that a correct statement?

John Gronmo

Thanks for Ed Roth's Windows Client: "Image-Based Windows XP Deployment" (June 2003, http://www.winnetmag.com, InstantDoc ID 38950). I'm anxious to use this technique but have a question about licensing and Windows Product Activation (WPA). Most of my clients don't have Microsoft Select License 6.0 and use OEM, Microsoft Open License 6.0, or Full Packaged Product (FPP) licensing instead. When an organization uses OEM, Open License, or FPP media to build a Sysprep image, how does WPA work? <P>

Unfortunately, in your case the answers aren't clear. The simple answer from Microsoft is, "For unattended installations that are not performed using volume-licensing media, a separate answer file, including a unique Product Key, must be created for each computer on which Windows XP Professional is installed." That's not an optimal solution for you. You need to consult your Microsoft representative to determine whether your FPP licensing (which I am unfamiliar with) will let you use one key. If that works, you'll then need to figure out the legality of and method for performing a clean installation of XP from your qualified upgrade media. The ability to provide one key for multiple installations will rely on the image having been built by the appropriate media. You can obtain a Volume License Key (VLK) for your Open License media by contacting the Microsoft Activation Center for the appropriate region. Microsoft should have provided the phone number for your Activation Center to you in a letter. You'll need to provide your Open License Authorization Number, your Open License Agreement Number, and the title and quantity of product you have licensed. In the case of your OEM-licensed systems, you have several options when deploying by using single license activation media, as discussed in the Microsoft article "Deploying Windows XP Using Windows Product Activation" (http://www.microsoft.com/windowsxp/pro/techinfo/deployment/activation/default.asp).<BR>

—Ed Roth

Dean Sherwood

Has anybody else has problems with the Outlook icon desappearing after a sysprep?

numark

Hey Learned The Hard Way -November 26, 2003 I too am having the same issue and ran across this tidbit for Uncle Bill Gates: Changes in behavior of the SysPrep and RIPREP tools after you install Windows XP Service Pack 2 http://support.microsoft.com/kb/887816 Hope this helps!!

Anonymous User

Hi all,

I would like some precision about driver install, on which I could not find any clear hint on the internet.

Does Sysprep.exe install all the drivers specified in te SysprepMassStorage section before rebooting and MiniSetup then just picks up the right one and delete the others when detecting the hardware ?

Or does Sysprep just delete all installed drivers and Mini-Setup searches the sysprep.inf file for appropriate drivers for the installed hardware ?

Thanks a lot for any hint...

Benoît "Mutos" ROBIN http://hoshikaze.net

Anonymous User

Article Rating 4 out of 5

 
 

ADS BY GOOGLE