View Full Version : [INSTALLDIR] Not Evaluated

11-05-2003, 04:56 AM
My InstallShield InstallScript project creates a registry key that is set to [INSTALLDIR]. This should be evaluated during installation to the path of my application but instead all I get in the registry is an unevaluated [INSTALLDIR].

Has anyone else seen this?

11-05-2003, 07:48 AM
Isn't [INSTALLDIR] a Windows Installer Property?

Maybe you should be using the InstallScript system variable TARGETDIR instead?

Hope that helps,


11-05-2003, 11:43 AM
Do you set it in the script or through IDE? In the script you should use INSTALLDIR, no []. IDE works fine with [INSTALLDIR] on my dev 8.0 project... I hope they didn't break it in 9.0.

11-05-2003, 01:54 PM
InstallScript MSI based = INSTALLDIR
InstallScript non-MSI based = TARGETDIR


11-05-2003, 01:57 PM

[INSTALLDIR] is an MSI formatted string. During the installation, that string will be replaced with the value of INSTALLDIR. This will not work for InstallScript (non-MSI) projects though. You'll have to use script to do something like that.

AdTheBad responded, and noted that <TARGETDIR> works fine. So, ignore my comment that you'll have to use script. Just use "angle bracket" notation.


11-06-2003, 06:45 AM
Thanks for all your help.

I had already posted this as a technical support query and had the problem confirmed, so I hadn't thought to look for something as simple as using a property from the wrong project type.

I had already tried [TARGETDIR] instead and had the same problem, but following all your comments I re-read the tutorials and found that if I use <TARGETDIR> it works fine.