cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Sedeti
Level 2

Need some help about fixing a special path in INSTALLDIR

Hi everyone,
I'm pretty new on InstallShield V12 I was using before the 2008 :o... anyway I need to do some basic MSI package and I need to specify a d:\ destination for the installation on my client computer... I have tried a lot of possibilities but I can only install in the C drive... (using the installdir options). I know I can do it using installscript instead... BUT 🙂

Thanks for your help guys.
Labels (1)
0 Kudos
(1) Reply
ITI_Randy
Level 6

Sedeti wrote:
Hi everyone,
I'm pretty new on InstallShield V12 I was using before the 2008 :o... anyway I need to do some basic MSI package and I need to specify a d:\ destination for the installation on my client computer... I have tried a lot of possibilities but I can only install in the C drive... (using the installdir options). I know I can do it using installscript instead... BUT 🙂

Thanks for your help guys.


In your direct editor, go to the Directory table and and a new folder, something like "CUSTOMVOLUME". Set the Directory_Parent to be WindowsVolume, the DefaultDir to ".", and ISAttributes to 0.

Go to General properties in the General Information area of your IDE and set the INSTALLDIR property to have a value that starts with [CUSTOMVOLUME] followed by whatever path you desire. Example: [CUSTOMVOLUME]MyCompany\MyFolder\MyProgram

When you click away from the INSTALLDIR, you will notice that the value [CUSTOMVOLUME] changes to [WindowsVolume], indicating that it equates to the value of [CUSTOMVOLUME], which you set to a default of WindowsVolume.

Add an InstallScript custom action to set the value of your CUSTOMVOLUME using the MsiSetTargetPath method. For example: MsiSetTargetPath(hMSI, "CUSTOMVOLUME", sVolume); where sVolume is your new volume you desire, in your case "D".

Keep in mind that you can't set the volume of the install to an invalid drive. It must exit and must be static. You can use the GetSystemInfo method to determine if a drive IS_FIXED to determine if it is acceptable.
0 Kudos