Compartilhar via


Add a Custom Command to an Answer File

Applies To: Windows 7, Windows Server 2008 R2

Note

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

  1. Open Windows SIM.

  2. Open an answer file. For more information, see Open an Answer File.

  3. On the Insert menu, point to Synchronous Command. Click a configuration pass from the submenu.

    The Create Synchronous Command dialog box opens.

  4. 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\RunSynchronous.

    • Commands added to the 4 specialize or 6 auditUser passes configuration pass appear in the setting: Microsoft-Windows-Deployment\RunSynchronous.

    • Commands added to the 7 oobeSystem pass appear in the setting: Microsoft-Windows-Shell-Setup\FirstLogonCommands.

Note

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.

See Also

Concepts

Understanding Settings and Properties
Windows System Image Manager User Interface
Customize a Setting in an Answer File
Open an Answer File