cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
MandyIndia
Level 3

Change the path of INSTALLDIR and folder.

Hi,
I have created a new folder "ProgramData"[INSTALLDIR]. Now when ever I install this application on any PC it is installed at "C:\ProgramData" which is what I want.
Now the problem is if some other other drive is connected to the PC which have large amount of free space, the application gets installed there for e.g. "F:\ProgramData" and my application crashes.
I want my application to be installed at C:\ drive.

I am not showing user option of selecting the place where user wants to install the application.

Please note I am using "Basic MSI Project" of installshied.
Is there any way where I can hardcode the path for INSTALLDIR and other folders.

Thanks in advance.
Regards,
Mandy.
Labels (1)
0 Kudos
(3) Replies
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

You could set TARGETDIR with a set property custom action to C:\. However, this should only be done if the C: drive exists on a target machine. If it doesn't and TARGETDIR is set to C:\, the installation will fail with a 1606 (could not access network location) error.
0 Kudos
MandyIndia
Level 3

joshstechnij wrote:
You could set TARGETDIR with a set property custom action to C:\. However, this should only be done if the C: drive exists on a target machine. If it doesn't and TARGETDIR is set to C:\, the installation will fail with a 1606 (could not access network location) error.


Thanks for reply,
Can you elaborate this in the steps as I am new to this.

Thanks,
Mandy
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

You will actually want to set INSTALLDIR with a set property custom action:
1. Create a new Set Property custom action in the Custom Actions view.
2. Use the following settings in the action:
Property Name: INSTALLDIR
Property Value: desired path (i.e. C:\Path)
Install UI Sequence: After AppSearch
Install UI Condition: Not Installed

This action should also be sequenced in the execute sequence if this package can be installed silently.
0 Kudos