Article ID: 232509 - View products that this article applies to.
This article was previously published under Q232509
NoticeThis article applies to Windows 2000. Support for Windows 2000 ends on July 13, 2010. The Windows 2000 End-of-Support Solution Center
(http://support.microsoft.com/?scid=http%3a%2f%2fsupport.microsoft.com%2fwin2000)is a starting point for planning your migration strategy from Windows 2000. For more information see the Microsoft Support Lifecycle Policy
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.
Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/322756/ )How to back up and restore the registry in Windows
RunOnceEx Sample to Run NotepadHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
Title = "My Setup Title"
Flags = dword:00000002
RunMyApp = "||notepad.exe"
Flags = dword:00000000
Title = "Status Dialog Box Title"
0001 = "xxx1"
000X = "xxxx"
Entry1 = "MyApp1.exe"
EntryX = "MyApp2.exe"
Definition of Values and SubkeysFlags is a DWORD value located in the RunOnceEx key to enable/disable the following settings.
Collapse this tableExpand this table
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\000x section contain the commands that should be run for the section. The format is:
"Line1" = "||my.exe -quiet -url http://www.microsoft.com/"Line1 runs the "my.exe -quiet -url http://www.microsoft.com/" command line. Line2 runs the DllRegisterServer function in Shdocvw.dll.
"Line2" = "shdocvw.dll|DllRegisterServer"
The HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\000x\Depend registry key contains the .dll files and the .ocx files that should be kept in memory while section 000x is running.
Article ID: 232509 - Last Review: January 24, 2007 - Revision: 2.6
Contact us for more help
Connect with Answer Desk for expert help.