PDA

View Full Version : Getting the installpath from the registry



Leones
07-29-2004, 08:23 AM
Hello,

I am currently working with the InstallShield Express, but I think this feature should work with any IS installer.

My problem: I should get the "INSTALLDIR" from a registryvalue, like "HKEY_LOCAL_MACHINE\SOFTWARE\PROJECT\PATH".
This is done without problems, if you only would like to get one value out of the registry. But in my case, I need to check 2 registryvalues. So the installer should check the first registryvalue and if he's not finding it, he should check the second registryvalue.

So my major question is: Is it possible to specify more then one INSTALLDIR, like " X or Y " , " if X exist install else y " ?


regards and thanks for your replies,

Léon

Will J.
07-29-2004, 11:18 AM
You can always set INSTALLDIR via a VBScript custom action according to the following InstallScript Knowledge Base article:

http://support.installshield.com/kb/view.asp?articleid=Q106900

You could then set your action to query the system for registry values and set INSTALLDIR based upon some conditions.

You can add custom actions to your project in the Installation Designer | 5 Define Setup Requirements and Actions | Custom Actions view.