Export (0) Print
Expand All

Using RunOnce Technology

You can run any programs after an .inf file is executed by adding entries to the RunOnce registry key. The RunOnce entries are executed the next time the computer is restarted and a user logs on to the system (if system logon is applicable).

The RunOnce registry key enables you to launch programs one time in Windows and to specify whether they should run "silently" (without prompts to the user) or as part of a list of programs or actions that the user sees. The reference to the program is then deleted so that the program is not run again.

To run programs silently, add description-string=command-line entries under the following registry key:


To run programs that synchronously run under the Windows Runonce manager, add description-string=command-line entries under the following registry key:


The following example shows an AddReg section that causes the following to happen:

  • Launch Myapp.exe (located in the Windows folder) with no user interface.

  • Launch Test.exe (located in the System folder) and display the message "Windows Setup is now setting up the following items":

    HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"Test Utility",,"%11%\test.exe"

Note Note 

  • The description string under the Setup registry key appears in the user interface.

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