cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dekwas
Level 3

Currently Installed Directory - Upgrade

Doing an upgrade I need to determine the directory that the software is currently installed at (selected by the user during initial install). Is there a variable/property in Installshield that contains this value, or how do I access it in the registry?
Labels (1)
0 Kudos
(9) Replies
Earthshine
Level 4

our applications have a Path variable in the registry that points to the location they are installed to.

Anyway, during an update, doesn't InstallShield already know where to put the updated files?
0 Kudos
haide1
Level 3

In an installscript setup TARGETDIR contains the path.
0 Kudos
dekwas
Level 3

This is InstallScript MSI project.

During upgrade, the INSTALLDIR and TARGETDIR (in OnBegin and OnEnd) are both the same and are the default install location (specified in the project General info). However these are NOT the location where the application was originally installed (user had manually selected another location). Obviously Installshield knows where the application is installed (since I have done upgrades and new/updated files are placed in the appropriate location). But how does Installshield know this directory. I assume it is in the registry - if so, how do I determine where to get it in the registry. Or is there another variable in Installshield (other than INSTALLDIR and TARGETDIR) that already has this directory where it should be doing the upgrade?

I assume that InstallShield does know where to put upgrades, so how can I get this from InstallShield. Earthshine, can you expand on what you know about getting this info from the registry.
0 Kudos
ch_eng
Level 7

dekwas, you could try looking in the registry in

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\InstallShield_{your-GUID}

HTH
0 Kudos
dekwas
Level 3

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\InstallShield_{your-GUID}\InstallLocation is empty.

How can this be set in InstallScript MSI project. I see references to ARPINSTALLLOCATION.
0 Kudos
ch_eng
Level 7

Oops - that location is for InstallShield 2011 I think. Try this one:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{your-GUID}

HTH
0 Kudos
dekwas
Level 3

Thanks ch_eng. That seems to be the one.
However, it appears that the SetARPINSTALLLOCATION needs to execute for install and upgrade (ours had a condition 'Not Installed', not sure where this is from).

So it appears that now SetARPINSTALLLOCATION sets the ARPINSTALLLOCATION property, which in turn sets the InstallLocation registry value (on install and upgrade).
The other confusing thing is that it appears that SetARPINSTALLLOCATION sets ARPINSTALLLOCATION to the value of INSTALLDIR, which I (hopefully properly) determined prior was NOT the correct location.
0 Kudos
ch_eng
Level 7

Does this apply to your upgrade scenario?

http ://kb.flexerasoftware.com/doc/Helpnet/installshield16helplib_sp1/UpgrdngToIS2009.htm#wp1111773

HTH
0 Kudos
dekwas
Level 3

That very well may be the case. Thanks for the feedback.
0 Kudos