Registering Application Path Information

The system supports "per application" paths. If you register a path, Windows sets the PATH environment variable to be the registered path when it starts your application. You set your application's path in the App Paths subkey under the HKEY_LOCAL_MACHINE key. Create a new key using your application's executable filename as its name. Set this key's Default value to the path of your executable file. The system uses this entry to locate your application if it fails to find it in the current path; for example, if the user chooses the Run command on the Start menu and only includes the filename of the application, or if a shortcut icon doesn't include a path setting. To identify the location of dynamic-link libraries placed in a separate directory, you can also include another value entry called Path and set its value to the path of your dynamic-link libraries.

HKEY_LOCAL_MACHINE
Software
Microsoft
Windows
CurrentVersion
App Paths
Application Executable Filename = path
Path = path

The system will automatically update the path and default entries if the user moves or renames the application's executable file using the system shell user interface.

Register any system-wide shared dynamic-link libraries in a subkey under a SharedDLLs subkey of HKEY_LOCAL_MACHINE key. If the file already exists, increment the entry's usage count index. For more information about the usage count index, see "Installation" later in this chapter.

HKEY_LOCAL_MACHINE
Software
Microsoft
Windows
CurrentVersion

SharedDLLs filename [= usage count index]