(Unattended Installation)

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

[GuiRunOnce]

The [GuiRunOnce] section contains commands that run the first time a user logs on to the computer after the final (GUI-mode) stage of 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 the next command can run.

Each line specifies a command that is run by the following registry entry:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Runonce.

See the following table for examples.

Examples of [GuiRunOnce] Section Entries

To install Add this line to [GuiRunOnce]

Domain Controller

dcpromo /answer:answer_file

Cluster service

%systemroot%\cluster\cluster.execlustername/create/options

where /options represents the command-line options that are associated with the cluster.exe program.

Note

  • You must put each command in quotation marks.

Commands run using the [GuiRunOnce] section in the context of the currently logged-in user. If the 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 user instead of as a service, the registry entries that the application creates are for the current user instead of the default user. (Setup propagates default user registry settings to new users.) If you want any settings and updates to appear only for the specifically logged-in user, then this might be appropriate. Otherwise, using Cmdlines.txt is a better approach to running commands and installing applications, because it runs as a system service.