Importance of a RunOnce Key in Device Driver Installation


September 19, 2009

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 -
http://www.dewassoc.com/support/useful/registry/reg_run_keys.htm
http://support.microsoft.com/kb/179365







If you’re not a subscriber, you can have msigeek blog notifications delivered to you free via these options: RSS Updates , Email Updates and SMS Alerts.

  • VIvek

    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.

  • Rodolfo

    Nice one !!
    I used to set active setup regkey for drivers instalation….
    Regards

  • Wahida Shaik

    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

  • http://www.msigeek.com/5569/how-to-get-an-inventory-of-all-the-installed-device-drivers-in-a-machine How to take an Inventory of all the Installed Device Drivers in a Machine?

    [...] Importance of a RunOnce Key in Device Driver Installation [...]

  • Anonymous

    that’s quite right….I almost forgot this step when I was doing the same thing….

  • Anonymous

    If these entries are missing, will there be runtime error?

blog comments powered by Disqus

Previous post:

Next post: