Prerequisites
To complete this process, the following is needed:
- Windows System Image Manager (Windows SIM) installed on a technician computer.
- Windows AIK for Windows 7
- Windows ADK (latest version) for Windows 8 and 8.1
- Both AIK and ADK can be installed on a single technician computer
- An authorized copy of the Windows 7, 8 or 8.1 product DVD or the ISO image
- Removable media, such as an external hard disk or a USB flash drive (UFD).
Step 1: Create a new answer file
In this step, a catalog and a new blank answer file will be prepared. A catalog file (.clg) is a binary file that contains the state of all the settings and the packages in a Windows image.
- On the technician computer, insert the Windows 7, 8 or 8.1 product DVD into the local DVD-ROM drive.
- On the desktop of the technician computer, navigate to the \Sources directory on the DVD-ROM drive. Copy the Install.wim file from the Windows product DVD to a location on the computer.
- Open Windows SIM. On the desktop of the computer, click Start, point to All Programs, point to Microsoft Windows AIK (or Windows Kits), and then click Windows System Image Manager.
- On the File menu, click Select Windows Image.
- In the Select a Windows Image dialog box, navigate to the location where you saved the Install.wim file, and then click Open.
Note: A warning could or will appear that a .clg file does not exist. Click OK to create a .clg file. If there is more than one Windows image in the .wim file, you are prompted to select the Windows image to open. - On the File menu, click New Answer File.
Step 2: Add and configure Windows settings
In this step, you define basic disk configuration and Windows Welcome settings.
In the Windows Image pane of Windows SIM, expand the Components node to display available settings.
On the expanded list of components, add the following components to your answer file by right-clicking the component and then by selecting the appropriate configuration pass. This action will add the component to your answer file in the specified configuration pass. A configuration pass is a phase of Windows installation. Different parts of the Windows Vista operating system are installed in different configuration passes. You can specify settings to be applied in one or more configuration passes.
- In the ‘Windows Image’ area (bottom left) select ‘amd64_Microsoft-Windows-Security-SPP_6.1.7600.16385_neutral’ (amd64 may also be x86 if you installed in 32bit) right-click it and select ‘Add to parse 3 generalize’.
- This moves this option into our answer file. Now select this item in the main window, this will show you the possible configuration options in the ‘Properties’ window on the right.
- Set ‘SkipRearm’ to 1.
Hint: Technically this should overwrite the Windows 7 rearm limit from 3 to unlimited.
Note: Setting the SkipRearm to 0 will reset the Activation grace-period timer. Configure this setting before finalizing (last SysPrep process) and deploying an image. - Select amd64_Microsoft-Windows-Deployment_6.1.7600.16385_neutral into parse 4 specialize
5. Right-click on RunSynchronous and add a command, then select ‘RunSynchronousCommand[Order="1"]’ and in Properties add the following:
- Order: 1
- Path: net user administrator /active:yes
- WillReboot: Never
- Select amd64_Microsoft-Windows-Security-SPP-UX_6.1.7600.16385_neutral into parse 4 specialize
- SkipAutoActivation: false (false will ensure that if you have used a volume license key Windows will automatically activate for you)
6. Select amd64_Microsoft-Windows-Shell-Setup_6.1.7600.16385_neutral into parse 4 specialize
- Computer Name: Leave blank
- CopyProfile: true
- Registered Organization: Microsoft (you must leave this in this section)
- Registered Owner: AutoBVT (you must leave this in this section)
Info: AutoBVT stands for Auto Build Verification Test. This is an account which was required upon SysPrep in order to verify that the SysPrep operation completed successfully. - ShowWindowsLive: false (do not select this when preparing for Windows 8/8.1)
- TimeZone: GMT Standard Time (Must be spelt exactly according to TimeZone settings here from Microsoft’s website)
7. Select amd64_Microsoft-Windows-International-Core_6.1.7600.16385_neutral into parse 7 oobeSystem
- InputLocale: en-US
- SystemLocale: en-US
- Language: en-US
- UserLocale: en-US
8. Select amd64_Microsoft-Windows-Shell-Setup_6.1.7600.16385_neutral into parse 7 oobeSystem
- RegisteredOrganization: Your Company Name
- RegisteredOwner: Your Name
- AutoLogon
- Enabled: true
- LogonCount: 5 (this will automatically log into the following account this number of times after setup so you can easily perform other software activations etc. Logging out will override this setting.)
- Username: administrator
- Password: Administrator Password
- FirstLogonCommands (right-click and add 2)
- SynchronousCommand[Order="1"]
- CommandLine: cscript /b c:\windows\system32\slmgr.vbs /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX (Windows 7 license key)
- CommandLine: cscript /b c:\windows\system32\slmgr.vbs /skms KMS-servername:port (when using a KMS Server)
- Order: 1
- RequiresUserInput: false
- SynchronousCommand[Order="2"]
- CommandLine: cscript //b c:\windows\system32\slmgr.vbs /ato
- Order: 2
- RequiresUserInput: false
- OOBE
i. HideEULAPage: true
ii. NetworkLocation: Work
iii. ProtectYourPC: 1 - UserAccounts
i. AdministratorPassword: Administrator Password
ii. On LocalAccounts, right-click and select action: AddListItem (this automatically creates a local Admin account) LocalAccount[Name="Administrator"]
Description: Local Administrator
DisplayName: Administrator
Group: Administrators
Name: Administrator
Password: Administrator Password
Copy the unattend.xml file into the C:\windows\system32\sysprep directory.
Important Security Information
Any passwords you have set in the answer file are stored unencrypted. Ensure you protect this file, especially if you entered a local administrator account password.
Create a script to remove the unattend.xml file after deployment
On the deployment base image computer open Notepad and enter in the following lines:
del /Q /F c:\windows\system32\sysprep\unattend.xml
del /Q /F c:\windows\panther\unattend.xml
These lines of code will delete the unattend.xml file from the computer once the Windows Setup is finished with them (this file is copied into the panther directory during setup hence the two lines). Save this file to the desktop called SetupComplete.cmd (ensure to change the file type from .txt to all types so the file doesn’t get saved as SetupComplete.cmd.txt). Now create a folder called Scripts in this directory: C:\Windows\Setup\ and drag this file into it (you may be prompted for Administrator authority).
Hint: Windows will automatically check for the existence of this file and run it after Windows Setup has completed, feel free to add anything else into this file you think may be helpful at this stage.