Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Add a Custom Command to an Answer File

Published: October 22, 2009

Updated: October 22, 2009

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

  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.

      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

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft