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