文章目錄
The Answer File
Before copying the answer file to your destination computer, you may wish to modify it manually, as I have found that the Setup Manager does not cover every aspect of the file. An easy way I like to do this is to open the answer file with a text editor, open the UNATTEND.DOC file (extracted from DEPLOY.CAB earlier), and browse through that file to make sure that the options you want have actually been added to your answer file. For example, the Setup Manager Wizard does not add or prompt you for a product ID, and you may want to add that into your answer file so that setup will not prompt you for such an ID. Also, you may want to make sure that the settings in the sample batch file match your own. In this example, I have modified the file:
- @rem SetupMgrTag
- @echo off
-
-
- rem
- rem This is a SAMPLE batch script generated by the Setup Manager Wizard.
- rem If this script is moved from the location where it was generated, it may have to be modified.
- rem
-
- set AnswerFile=./unattend.txt
- set SetupFiles=D:/i386s
-
- D:/i386s/winnt /s:%SetupFiles% /u:%AnswerFile%
The lines we are concerned with are set SetupFiles and the first part of the last line, which starts the actual setup process. For SetupFiles, we want to specify the location of the distribution folder. In this particular case, it is D:/i386s. Modify the last line so that winnt instead of winnt32 is run, and make sure that it is run from the correct path, in this case D:/i386s. Also, the parameter for specifying the answer file is different for winnt.exe. Winnt.exe uses /u, whereas winnt32.exe uses /unattend. Make sure you specify the correct switch, or else setup will ignore your answer file.
It pays to spend a little time making sure your answer file is perfect, because the process of creating the answer file is the hardest and longest part of the unattended installation, and you only have to do it once. Once you have an answer file that matches the configurations of all your servers or workstations, all you have to do is edit the product ID before you copy the file to each of those computers, and then spend a few seconds at each computer starting the setup process, instead of sitting at each computer waiting to input options during setup. Obviously, this is a great timesaver. Now, let us highlight the steps we will take in those few seconds to begin unattended setup.