RunEx

Windows 98 ( and Windows 2000) includes the RunOnceEx and RunEx registry keys for additional functionality of Run registry keys. The syntax and format used for these keys is different from the RunOnce and Run keys.

 

Sample Syntax

Note that text in braces ({}) are strings generated by the user.

The following keys are located in the Local_Machine and/or Current_User hive(s).

SOFTWARE\Microsoft\Windows\CurrentVersion\RunEx

-or-

SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

Flags = 0x0000000

Title = "{Status Dialog Box Title}"

Depend\

{PlaceHolder1} = "{DLL/OCX Filename}"

{PlaceHolder...} = "{DLL/OCX Filename}"

{SectionPlaceHolder1}\

Default="{SectionName1}"

{Entry1} = "{EntryFormat}"

{Entry...} = "{ntryFormat}"

Depend\

{PlaceHolder1} = "{DLL/OCX Filename}"

{ceHolder...} = "{DLL/OCX Filename}"

{SectionPlaceHolder...}\

 

Definition of Values and Subkeys

Name: Flags

Value Type: DWORD

Value Path: SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\

Description: Contains setting to enable or disable certain functions of the RunEx or RunOnceEx key.

 

Value Function Function definition

0x00000000 Default All functions are disabled

0x00000001 Delete Delete registry entries after processing them ((normally only RunOnceEx)

0x00000002 Wait Causes items to be run synchronously

0x00000004 Check Shell Status Verifies that the shell is ready to accept OLE commands

0x00000008 No Error Dialogs Error dialog boxes are not displayed

0x00000010 Create Error Log File Create C:\Windows\RunOnceEx.err file if errors occur

0x00000020 Create Execution Log File Create C:\Windows\RunOnceEx.log file with status of commands

0x00000040 No Exception Trapping Does not trap exceptions that occur when registering DLLs

0x00000080 No Status Dialog Status dialog box is not displayed while RunOnceEx runs

0x00000100 Ignore Flags Flags registry key is ignored

These values are additive.

 

Example

If you want to create an error log and have no status dialog box, you would set Flags = 0x00000090 (0x0000010 + 0x00000080 = 0x00000090)

Name: Title

Value Type: STRING

Value Path: SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

Description: This value fills in the Status Dialog Box Title

Key Path: SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\Depend

Description: Contains values that point to DLLs that should be kept loaded in memory while all sections of RunOnceEx are being run.

 

Name: {PlaceHolder1}

Value Type: String

Value Path: SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\Depend

Description: Contains a DLL or OCX file name with or without the path to the file. The text "{PlaceHolder1}" can be any valid

registry value name.

Key Path: SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\{SectionPlaceHolder1}\

Description: Contains entries to be run. Sections are run in alphabetical order. The text "{SectionPlaceHolder1}" can be any valid registry key name.

 

Name: Default

Value Type: STRING

Value Path: SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\{SectionPlaceHolder1}\

Description: The text "{SectionName1}" can be any valid registry value name.

 

Name: {Entry1}

Value Type: STRING

Value Path: SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\{SectionPlaceHolder1}\

Description: The text "{Entry1}" can be any valid registry value name. This value contains the string that is actually run.

Format: "<DllFileName>|<FunctionName>|<CommandLineArguements>"

 

Example:

 

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

"Line2" = "shdocvw.dll|DllRegisterServer"

 

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

Shdocvw.dll.

 

Key Path: SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\{SectionPlaceHolder1}\Depend

Description: Contains values that point to DLLs that should be kept loaded in memory while only this particular section of

RunOnceEx is being run.