Answer File = Unattend.txt and Sysprep.inf
The [GuiRunOnce] section contains commands to execute the first time an end user logs on to the computer after GUI-mode Setup completes.
Commands called in the [GuiRunOnce] section process synchronously. Each application runs in the order listed in this section, and each command must finish before you run the next command.
Each line specifies a command that the [GuiRunOnce] registry entry executes, HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Runonce. See the following table for examples:
To install | Add this line to [GuiRunOnce] |
---|---|
Domain Controller | dcpromo /answer:answer_file |
Cluster service | where /options is defined in the "Managing server clusters from the command line" topic in the Windows Server Help. |
Important
Commands run using the [GuiRunOnce] section in the context of the currently logged-in end user. If the end user does not have the permissions necessary to run the command completely, then the application fails. Because this application runs in the context of a logged-in end user instead of as a service, the registry entries that the application creates are for the current end user instead of the default user. (Setup propagates default user registry settings to new end users.) If you want any settings and updates to appear only for the specifically logged-in end user, then this might be appropriate. Otherwise, Cmdlines.txt is a better approach to running commands and installing applications, because it runs as a system service.