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.
Feature Path not changing
Started by
bertwolf
, Oct 09 2008 19:31
5 replies to this topic
Posted 09 October 2008 - 19:31
I have an install built for our application. The inital INSTALLDIR is C:\harris. Each of the features are set up with a destination of
[INSTALLDIR]something. I have a custom dialog that asks the user if this is a network or local install. If it's a network install, INSTALLDIR gets set to O:\Harris. The next dialog is DestinationFolder and it does show the value of INSTALLDIR on that dialog. The next dialog I call is CustomSetup, and here is where the problem is. If you click on one of my features that is supposed to be installed to some folder under INSTALLDIR, instead of saying O:\Harris\whatever, it still says C:\Harris\whatever. If we do not notice this, the application gets installed on C.
The text comes from <selected feature path>. What I don't understand is if the feature is supposed to install to INSTALLDIR, why the selected feature path is wrong? What can I do to get this to change?
I'm using InstallShield 2008 with a Basic MSI project
[INSTALLDIR]something. I have a custom dialog that asks the user if this is a network or local install. If it's a network install, INSTALLDIR gets set to O:\Harris. The next dialog is DestinationFolder and it does show the value of INSTALLDIR on that dialog. The next dialog I call is CustomSetup, and here is where the problem is. If you click on one of my features that is supposed to be installed to some folder under INSTALLDIR, instead of saying O:\Harris\whatever, it still says C:\Harris\whatever. If we do not notice this, the application gets installed on C.
The text comes from <selected feature path>. What I don't understand is if the feature is supposed to install to INSTALLDIR, why the selected feature path is wrong? What can I do to get this to change?
I'm using InstallShield 2008 with a Basic MSI project
Posted 12 October 2008 - 14:17
How do you set INSTALLIR? If you do this after CostFinalize you should use the SetTargetPath control event or a type 35 custom action. Simply setting the INSTALLDIR property to the new value isn't enough because all dependent subdirectories need to be updated.
Before CostFinalize setting the INSTALLDIR property (e.g. on the command line) is sufficient because the directory tree is computed for the first time during costing.
Before CostFinalize setting the INSTALLDIR property (e.g. on the command line) is sufficient because the directory tree is computed for the first time during costing.
Stefan Krüger
InstallSite.org twitter facebook
Posted 13 October 2008 - 14:08
It happens when leaving the DestinationFolder dialog, so it would be after CostFinalize. I've tried to use SetTargetPath as part of the events that happen when clicking the Next button on the DestinationFolder dialog, but I always get an error "The argument of the CheckPath control event on dialog DestinationFolder is invalid." The path being installed to does not exist at that point, should/can I create it before SetTargetPath
Posted 17 October 2008 - 22:48
Did you try changing the path from the CustomSetup dialog (the feature tree dialog)? In general, if you didn't change InstallShield's built in dialogs, it should just work.
Stefan Krüger
InstallSite.org twitter facebook
Posted 20 October 2008 - 13:30
If when we're running the install we change the path on the custom setup dialog, yes, it goes where we tell it to.
What I don't know is why when the destination folder dialog says to install to O:, the Custom setup dialog doesn't recognize that and we still have to change it there. It's still showing it wants to install to the original install directory that I have set up in the package.
Here's a basic outline of what happens:
1. Original INSTALLDIR is c:\Harris
2. On one of my dialogs, the user is asked if this is a network or local install. If it is a network install, INSTALLDIR gets changed to O:\Harris
3. When the DestinationFolder dialog comes up, it will reflect O:\Harris if it's a network install
4. Custom Setup is next, and the install location for each feature says "c:\Harris\whatever". The features are setup to be installed to various folders under the install directory, (e.g. [INSTALLDIR]OWFIN\OWGL). It seems like it figures out what that path is at the beginning and no matter what I do, it won't see the change.
We can get around it, but it doesn't seem I should have to.
What I don't know is why when the destination folder dialog says to install to O:, the Custom setup dialog doesn't recognize that and we still have to change it there. It's still showing it wants to install to the original install directory that I have set up in the package.
Here's a basic outline of what happens:
1. Original INSTALLDIR is c:\Harris
2. On one of my dialogs, the user is asked if this is a network or local install. If it is a network install, INSTALLDIR gets changed to O:\Harris
3. When the DestinationFolder dialog comes up, it will reflect O:\Harris if it's a network install
4. Custom Setup is next, and the install location for each feature says "c:\Harris\whatever". The features are setup to be installed to various folders under the install directory, (e.g. [INSTALLDIR]OWFIN\OWGL). It seems like it figures out what that path is at the beginning and no matter what I do, it won't see the change.
We can get around it, but it doesn't seem I should have to.
Posted 31 October 2008 - 15:34
Setting the INSTALLDIR will only change this folder property, but not atomatically update all dependent folder properties (sub folders of INSTALLDIR). You need to call SetTargetPath to do this.
Stefan Krüger
InstallSite.org twitter facebook