PDA

View Full Version : [INSTALLDIR] drive letter/volume label



aglundberg
12-01-2005, 05:18 PM
[INSTALLDIR] is the property containing, for example, "d:\program files\TCI\", which is the primary installation directory.
I'd like to install some more stuff in "d:\TCI", though, or whichever drive is specified in [INSTALLDIR].

Is this possible? If so, how?

Thanks,
Andreas

TsungH
12-01-2005, 08:33 PM
Assuming the drive letter of INSTALLDIR property is on the same volume as Windows volume, you can have used WindowVolume property. Otherwise, you may have to use hardcoded value (most likely with a Custom Action) to achieve that.

However, it is strongly advised against using hardcoded drive letter, as not all machines will have that drive for whatever reasons. Even if there are policies to enforce standardized environment, policies do change over time.

RobertDickau
12-01-2005, 11:26 PM
In addition to the WindowsVolume property that Tsung suggests, it's a bit more work but you might find PrimaryVolumePath (and related properties, about which see the Windows Installer Help Library) to be of use...

aglundberg
12-02-2005, 09:30 AM
Those options are not sufficient.

WindowsVolume will only work if I will always install to the same drive as windows, which is almost never the case for this application.

PrimaryVolumePath is the drive letter (plus ":\") of the PRIMARYFOLDER property. Unfortunately PRIMARYFOLDER is not the same as INSTALLDIR and will not change to whatever the user selects as his installation directory.

I think that perhaps InstallShield Express is too limited for this functionality, but I know someone that has done it, although he can't remember how and doesn't have the time to figure it out.

ROOTDRIVE is another property that looked promising, but it's simply the volume with the largest amount of accessible free space.

Thanks,
Andreas