Auto-find via Registry Lookup

Patch files for the Win32 platform can auto-find the installed target software by looking at the system registry. This is done by embedding the name of a registry key that will contain the path to the software if installed on the computer. This is done with option "-key" of GenPatch. When applying a patch file with embedded registry lookup information, it is required that the registry key is used to located the patch target. This forbids other platforms than Win32 to apply the patch file since they cannot access the Win32 registry.

Note: With registry lookup, the location of the patch file when launched does not matter at all.

We recommend to use this option if your software is for Win32 and you have a suitable patch file installed since it saves your users from even entering a path to the application, so it could not be easier.

To make patch files for Win95/NT that auto-find the software using registry lookup, just specify the registry key to the option "-key" of GenPatch. Note that key names are by default assumed to be relative to HKEY_LOCAL_MACHINE unless you specify different.

The option "-key=SOFTWARE\YourSoftware\InstallPath" will tell the patch file to check the path found in the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\YourSoftware" and its value of "InstallPath".

If you wanted to use the default value of a key make sure that the value ends with a "\" like in "-key=SOFTWARE\YourSoftware\". GenPatch takes all before the last slash as the key part and all after is regarded as the value part.

Note that GenPatch may create patch files with registry lookup lookup on any platform, but only Win32 will be able to do a check whether there is such a key installed on your machine warning you if you seemingly made a mistake providing the key name.

To ease the use of this option with more Unix like shells "/" was made an alias of "\" for the key names and to avoid issues with "\" ending your GenPatch command line call, you can use "@" as an alias for the default key.