Patch unexpectedly resets registry values
Posted 06 July 2004 - 15:24
These are correctly populated with the path the software is installed to on installation.
When a patch is applied, these are reset to the default value of INSTALLDIR, regardless of where the product was originally installed.
The registry keys are not part of the patch.
eg Initial installation to D:\MyProduct, registry key HKLM\Software\MyProd\ExePath = D:\MyProduct\Exe
After patching the key value is :
Is this a Windows Installer problem, a problem with the way INSTALLDIR is used or a problem with our installer / patch?
Any help appreciated.
Posted 06 July 2004 - 15:32
If you already have setups out with customers, this does not help you. I don't know of any elegant solutions. Maybe you can rename the registry key to a temporary value, delete the value the upgrade inserts and then change the name back to the real name for the backup registry key. Stefan probably has a nicer solution. Finally, it is also possible to call regedit.exe with the /e command line and export the registry section to a *.reg file and then import it again at the end of the install. I posted a description of how to do this on this board some time ago, please do a search for it if you want to try it (if regedit.exe is not available this method will obviously fail).
Edited by Glytzhkof, 06 July 2004 - 15:34.
Posted 06 July 2004 - 15:38
I think it's something to consider for the future and the next major upgrade. It's only a problem if the product is installed to a non default location.
I may well use the regedit solution as a work around though.
Posted 06 July 2004 - 15:47
Posted 06 July 2004 - 15:48
Posted 07 July 2004 - 08:50
To initialize INSTALLDIR properly, you'll need a CA that tries to read INSTALLDIR (and other directories, if that is the case) from the previous install.
Posted 07 July 2004 - 09:22