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

Dynamically changing Component Destination


3 replies to this topic

Dave I

Dave I
  • Members
  • 195 posts

Posted 14 March 2001 - 17:49

I have a dialog with buttons...Option 1 , Option 2.

If Option 1 is selected then I want the destination of the "Option" component = "C:\Program Files\Install\Option1", if Option 2 = "......\Option2".

I think I am 1/2 way there , I have CA which uses MsiSetProperty to set OPTIONDIR to the correct directory depending on the selection.  By popping up a MessageBox I know that the property has the correct value.

I have put OPTIONDIR in the Destination of the component but still no luck, the component is getting installed into INSTALLDIR??

Any ideas.


SteveP

SteveP
  • Members
  • 126 posts

Posted 16 March 2001 - 02:18

When are you executing the CA?  The only paths that can be changed after CostInitialize are those associated with Features.  Those can be set by conditions between CostInitialize and CostFinalize or by a SelectionTree control after CostFinalize (which will essentially cause another CostFinalize action).

If your selection dialog is in the standard UI sequence, it falls AFTER cost finalize, and you may need to reposition the start point for the WelcomeDlg and run your selections prior to CostInitialize.  Otherwise, put your Option components into a Feature and select the path using a BrowseDlg or SelectDlg.

Please drop me an email if you would like to discuss this in additional detail.


Dave I

Dave I
  • Members
  • 195 posts

Posted 16 March 2001 - 11:51

Ok I have put my common files in a feature now what?

All I am looking for is the ISWI equivalent to the InstallShield 5.5 command:

"ComponentSetTarget (MEDIA,"<OPTIONDIR>",TARGETDIR ^ "Option1");"