RunOnce Request Types and Scenarios (Windows Embedded Standard 2009)

4/23/2012

The RunOnce Request is a resource that can be added to a run-time image to make an application run during first boot, after first boot, or after every logon instance. This allows you to create a single-purpose device or a dedicated device on which only a certain shell or application is exposed to the user. It also enables you to run specific applications or commands during or after first boot, and to always execute applications such as system diagnostics, at every system startup.

The RunOnce Request is added to the run-time image as a registry key in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\.

The following list shows the different types of RunOnce Requests that can be used:

  • The Run key is processed after every logon, either by the Explorer shell if it is present, or by First Boot Agent (FBA) if a custom shell, Command shell, or Task Manager shell is used. If FBA processes this key, it does so after every logon, not during first boot.
  • The RunOnce key is processed only once, by FBA, after Plug and Play device enumeration and DLL registration processing have completed. The values of this registry key are deleted from the registry after it is processed so that it will not run again.
  • The RunOnceEx key is processed only once, by the Explorer shell, after the first logon. The values of this registry key are deleted from the registry after it is processed, so that it will not run again. If the Explorer shell is not present, this key is ignored.

For more information about the RunOnce Request resource, see RunOnce Request.

The following list shows some scenarios in which you could use a RunOnce Request:

  • To run a script file during FBA that installs additional applications.
  • To run a script after FBA that starts a service.
  • To run an application automatically after each logon, so that it provides the appearance of a custom shell.

See Also

Other Resources

Running an Application Automatically
First Boot Agent