Microsoft KB Archive/232509

= Syntax for the RunOnceEx Registry Key =

Article ID: 232509

Article Last Modified on 1/24/2007

-

APPLIES TO


 * Microsoft Windows 2000 Server
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Professional Edition
 * Microsoft Windows 98 Standard Edition
 * Microsoft Windows Millennium Edition

-



This article was previously published under Q232509



IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry



SUMMARY
The Windows Desktop Update component implements the RunOnceEx registry key that provides the functionality described in this article. The Windows Desktop Update component is included with Windows 98 and Windows 2000. You can also install the Windows Desktop Update component with Microsoft Internet Explorer 4.0. Note that the syntax and format used for this key is different from the RunOnce key.



MORE INFORMATION
WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

RunOnceEx Sample to Run Notepad
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

Title = "My Setup Title"

Flags = dword:00000002

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\0001

RunMyApp = "||notepad.exe"

Sample Syntax
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

Flags = dword:00000000

Title = "Status Dialog Box Title"

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\Depend

0001 = " 1"

000  = " "

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\0001

Entry1 = "MyApp1.exe"

Entry  = "MyApp2.exe"

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\000 

...

Definition of Values and Subkeys
Flags is a DWORD value located in the RunOnceEx key to enable/disable the following settings.

The values are cumulative. If you want "No Status Dialog" and "Create Error Log File," set Flags to hexadecimal 90 (80 + 10).

Title is a STRING value that you can use to fill in the Status dialog box title.

The HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\Depend registry key contains the .dll files and the .ocx files that should be kept loaded in memory while all sections of RunOnceEx are running.

The HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\000X registry keys contain entries to be run. These sections are run in alphabetical order. Therefore, the ...\RunOnceEx\0001 section is processed before the ...\RunOnceEx\0002 section.

The string values within a ...RunOnceEx\000  section contain the commands that should be run for the section. The format is:

" | | "

-or-

"|| "

For example:

"Line1" = "||my.exe -quiet -url http://www.microsoft.com/"

"Line2" = "shdocvw.dll|DllRegisterServer"

Line1 runs the "my.exe -quiet -url http://www.microsoft.com/" command line. Line2 runs the DllRegisterServer function in Shdocvw.dll.

The HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\000 \Depend registry key contains the .dll files and the .ocx files that should be kept in memory while section 000  is running.

Keywords: kbenv kbinfo KB232509

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.