PDA

View Full Version : Need to install to exact same path as another installed app



neal007
06-10-2004, 05:32 PM
I have my main application installed. I now have an add-in I want to include but it must be installed to the same path as the original installation + \MyAddin.

I'm using InstallScript MSI

How do I find out the installation path of the prior install and set it to the path of the Add-In installation?

Mark at IS
06-11-2004, 07:29 AM
Originally posted by neal007
How do I find out the installation path of the prior installCheck the data in the InstallLocation value under the prior installation's application uninstallation registry key (<root key>\Software\Microsoft\Windows\CurrentVersion\Uninstall\<Product GUID>; the root key is HKEY_CURRENT_USER if the prior installation's ALLUSERS system variable was FALSE or it called ProgDefGroupType(PERSONAL), or HKEY_LOCAL_MACHINE otherwise).

To get the data for a registry value, call RegDBGetKeyValueEx; for details, see the help.