Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Changing INSTALLDIR with InstallScript


1 reply to this topic

finding_this_difficult

finding_this_difficult
  • Members
  • 21 posts

Posted 10 August 2005 - 23:08

I wrote a script to change the INSTALLDIR based on certain parameters, however, when the install executes not all of the files are installed to the new location. The component in question has a dynamically linked folder and only the root files are being installed to the new location, all remaining folders and their files are being installed to the original install location.
To change INSTALLDIR I am doing:

msisetproperty(hMSI,"INSTALLDIR", "c:\newfolder");

The script gets executed by a custom action when the user selects a particular radio button.

Any ideas?

Thanks,
A

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 11 August 2005 - 09:47

You would have to do this before CostFinalize (which isn't possible if you want to do it based on user input on a dialog because dialogs are displayed after CostFinalize).
I recommend using a custom action type 35 (Set a directory) which you can call after CostFinalize, e.g. as event from the Next button of that dialog (no need for InstallScript here). This type of custom action should propagate the change to subfolders (at least I think it does)