Freigeben über


Add a Custom Command to an Answer File

Applies To: Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2

The following procedure describes how to configure a custom command to run automatically during Windows® Setup.

To add a custom command to an answer file

  1. Open Windows System Image Manager (Windows SIM).

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

  3. On the Insert menu, point to Synchronous Command, and then click a configuration pass on the submenu.

    The Create Synchronous Command dialog box opens.

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

See Also

Tasks

Create or Open an Answer File
Configure Components and Settings in an Answer File
Validate an Answer File
Hide Sensitive Data in an Answer File
Add a Device Driver Path to an Answer File
Add a Package to an Answer File
Find a Component, Setting, or Package in Windows SIM

Other Resources

Windows SIM How-to Topics