Add a Custom Command to an Answer File
Applies To: Windows 7, Windows Server 2008 R2
This content applies to Windows 7. For Windows 8 content, see Windows Deployment with the Windows ADK.
The following procedure describes how to configure a custom command to launch automatically during Windows® Setup.
To add a custom command to an answer file
Open Windows SIM.
Open an answer file. For more information, see Open an Answer File.
On the Insert menu, point to Synchronous Command. Click a configuration pass from the submenu.
The Create Synchronous Command dialog box opens.
In the Enter command line text box, enter the command, with parameters. In the Order box select the order of the commands to run, and click OK.
The command is added to the answer file in the selected configuration pass:
Commands added to the 1 windowsPE configuration pass appear in the setting: Microsoft-Windows-Setup\
Commands added to the 4 specialize or 6 auditUser passes configuration pass appear in the setting: Microsoft-Windows-Deployment\
Commands added to the 7 oobeSystem pass appear in the setting: Microsoft-Windows-Shell-Setup\
If you create a user account that does not include administrative privileges, commands added to the 7 oobeSystem pass may not be executed:
- If User Account Control is enabled, then when that user logs in for the first time, a dialog box appears, prompting the user with an option to allow an administrator to apply the commands. If the user selects Cancel, these commands are not executed.
- If User Account Control is disabled, these commands are not executed.