Importance of a RunOnce Key in Device Driver Installation

Well, The Run and RunOnce registry entries help programs to be run automatically. In device driver installations,  A RunOnce entry is executed immediately after the driver is installed; These entries are not executed until the user logs on.

For a Client-side installation, all RunOnce entries are executed. No Run, RunEx, or RunOnceEx entries are executed.
For a Server-side installation, Setup looks for RunOnce entries in the INF in the format described on the DDK. The DLLs specified are run in the system context with no UI. Any RunOnce entries that do not follow this format are deferred to a client-side installation and are run in administrator context with UI.

This is the primary reason for special requirements on RunOnce entries.

Addition Information: Run, RunEx, or RunOnceEx entries are executed only in the context of a logged-on user, and are not executed immediately after device is installed. A Service entry can immediately provide functionality for multiple logged-on users, whereas Run entries provide service to them only when the user next logs on, and also run one instance for each user.

For more information on RunOnce and Run Keys, Check these links –


  1. Good info VJ, Thank you for the information.

    The run once is very much useful to do the configuration changes in user profile on first logon.

    In the OS deployment also it is much useful to install the multiple setups/ Drivers. Some of the Drivers cannot be added in SYSPREP process, can be bundled and installed thorugh this Run Once Registry Key option.

  2. Yet another good good article from Vijay…!

    Can you or anyone explain in detail the difference between Run, RunOnce & Active Setup ? Why dont we got for HKLM….Run instead of Active Setup in many cases ?

    Thanks in advance

Leave a comment

Your email address will not be published.