2
votes

I'm working on a Basic MSI project in InstallShield 2012 Pro.

I'm trying to set the INSTALLDIR property with the value of a registry key with no success.

  1. I've tried to set the property with the full registry path as per this page, but when running the installation, it's recognized as a network path and fails

  2. I've created a System Search to get the registry value and store it in a property, but when setting INSTALLDIR to {MY_REGISTRY_PATH}, it also fails.

Any ideas/suggestions?

Best regards, Julio

1

1 Answers

1
votes

Have you logged the installer? Does AppSearch return a value?

For what it's worth, you can't change INSTALLDIR ( or any directory property ) once it has clients ( components ) installed. What I do is

AppSearch -> INSTALLDIRFOUND Type 51 Set Property CA SetINSTALLDIR = INSTALLDIRFOUND condition Not INSTALLDIR and INSTALLDIRFOUND and Not Installed

This ensures that the custom action only fires during the initial ( or major upgrade ) context and only if INSTALLDIRFOUND has a value and INSTALLDIR was not passed at the command line.

This needs to be scheduled for both the UI and Execute sequences.