ProblemYou want to use a script file to have a completely "hands-free" installation of Windows XP, particularly for use on multiple computers. SolutionUsing a graphical user interfaceUse Setup Manager to generate an unattended setup file based on your responses to different prompts.
Once Setup Manager has started, you'll be prompted either to create a new answer file or to edit an existing one. Choose to create a new one, and click Next. Now, you're presented with several options, depending on the particular application for which your new answer file will be used. You can create a basic unattended setup answer file, one that can automate the mini-Setup program inside an installation that has been run through the SYSPREP utility (more on this later), or a file that will control installations started with RIS, or Remote Installation Services. Both of these are covered later in this chapter. For now, select to create a normal, basic unattended setup answer file, and click Next. The next screen prompts you to choose the operating system for which you're creating an unattended install you can create files for all editions of Windows XP and all editions of Windows Server 2003 except Datacenter, too, so the Setup Manager utility is more useful than it might otherwise appear. Choose to install Windows XP and click Next. At this point, you can now choose what level of "hands-off" you wish to achieve: a completely hands-on installation with customized defaults read from the answer file, a fully hands-off installation that is started from the command line and not finished until Windows XP is completely installed, and most options in between. Choose Fully Automated to get the full breadth of options that Setup Manager can manage, and click Next. Here, Setup Manager offers to assist you in creating a distribution share on your network, a file share that contains an entire copy of the Windows distribution files for the purposes of kicking off network-based automated installation sequences. For our purposes, click on "No, this answer file will be used to install from a CD," since we just need to create an answer file, not generate an infrastructure for more complex rollouts. Click Next, accept the End-User License Agreement, and click Next once more. You have completed the wizard portion of the Setup Manager process, and the screen shown in Figure 2-3 is shown. Figure 2-3. Setup Manager's detailed configuration screenThe remaining portion of Setup Manager involves customizing the many details of a Windows XP installation.
You can see a sample SIF file, generated by Setup Manager, in the Discussion section of this recipe. Using a command-line interfaceTo begin an unattended setup using a script, you first need to call WINNT32.EXE from the command line using the following, assuming your script is in C:\Deploy: > Winnt32 /unattend:c:\deploy\winnt.sif Another method is a bit less keyboard interactive but requires more manual labor: if you use the distribution CD-ROM to install Windows XP and you boot directly from it, Setup will look for a file on a floppy in the A drive named WINNT.SIF. If it finds one, Setup will read the instructions from it; if it doesn't, then Setup will continue along a normal, user-interactive process. DiscussionPerhaps the simplest method of automating Windows XP deployment is to use unattended setup answer files. These files use a syntax not unlike that found in Windows 3.1's old INI files, providing answers for questions like computer name, your CD key, your name, where you live, and the like. Here is a sample unattended setup file (known as an SIF file): [data] floppyless = "1" msdosinitiated = "1" OriSrc = "\\%SERVERNAME%\RemInst\%INSTALLPATH%\%MACHINETYPE%" OriTyp = "4" LocalSourceOnCD = 1 DisableAdminAccountOnDomainJoin = 1 [SetupData] OsLoadOptions = "/noguiboot /fastdetect" SetupSourceDevice = "\Device\LanmanRedirector\%SERVERNAME%\RemInst\%INSTALLPATH%" [Unattended] OemPreinstall = yes OemPnpDriversPath = \Drivers\Nic DriverSigningPolicy = Ignore FileSystem = LeaveAlone ExtendOEMPartition = 0 TargetPath = \WINDOWS OemSkipEula = yes InstallFilesPath = "\\%SERVERNAME%\RemInst\%INSTALLPATH%\%MACHINETYPE%" LegacyNIC = 1 [UserData] FullName = "%USERFIRSTNAME% %USERLASTNAME%" OrgName = "%ORGNAME%" ComputerName = %MACHINENAME% ProductID = "ABCDE-12345-FGHIK-67890-LMNOP" [GuiUnattended] OemSkipWelcome = 1 OemSkipRegional = 1 TimeZone = %TIMEZONE% AdminPassword = "*" [Display] BitsPerPel = 24 XResolution = 1024 YResolution = 768 VRefresh = 60 [Networking] [NetServices] MS_Server=params.MS_PSched [Identification] JoinDomain = %MACHINEDOMAIN% DoOldStyleDomainJoin = Yes [RemoteInstall] Repartition = Yes UseWholeDisk = Yes [OSChooser] Description ="Windows XP with Service Pack 2" Help ="Automatically installs Microsoft Windows XP Professional without prompting the user for input." LaunchFile = "%INSTALLPATH%\%MACHINETYPE%\templates\startrom.com" ImageType =Flat Version="5.1 (0)" See AlsoRecipe 2.5 for cloning Windows XP installations, Recipe 2.6 for installing from Remote Installation Services, Recipe 2.17 for slipstreaming a service pack or hotfix into a build, and MS KB 155197, "Unattended Setup Parameters" for information on each setting in the SIF file |