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 nonPlug 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 -->