Add a Custom Command to an Answer File
The following procedure describes how to configure a custom command to run automatically during Windows Setup.
Open Windows System Image Manager (Windows SIM).
Create or open an answer file. For more information, see Create or Open an Answer File.
On the Insert menu, point to Synchronous Command, and then click a configuration pass on the submenu. The Create Synchronous Command dialog box opens.
In the Enter command line box, type the command-line syntax. In the Order box, select the order of the commands that will run, and then click OK. The command is added to the answer file in the selected configuration pass, as follows:
Commands that are added to the 1 windowsPE configuration pass appear in the setting Microsoft-Windows-Setup\RunSynchronous.
Commands that are added to the 4 specialize or 6 auditUser passes configuration pass appear in the setting Microsoft-Windows-Deployment\RunSynchronous.
Commands that are added to the 7 oobeSystem configuration pass appear in the setting Microsoft-Windows-Shell-Setup\FirstLogonCommands.
Note
If you create a user account that does not include administrative rights, commands that are added to the 7 oobeSystem configuration pass may not be run. Details are as follows:
- If User Account Control is enabled, a dialog box appears when that user logs on for the first time. The dialog box provides an option to allow an administrator to apply the commands. If the user clicks Cancel, these commands are not run.
- If User Account Control is disabled, these commands are not run.
Related topics
Windows System Image Manager How-to Topics
Configure Components and Settings in an Answer File
Hide Sensitive Data in an Answer File
Add a Device Driver Path to an Answer File