Page 1 of 1

Redirecting Files?

Posted: Tue Apr 17, 2007 6:42 am
by Superfreak3
I see in the MSICODE script that $TARGETDIR$ is set to the location I had set to the default location in the Visual view; $PROGRAMFILES$\\My Company\\My App\\.

What if the user selects some other location on the Destination dialog. Do I simply set $TARGETDIR$ to the text of the control holding the new selection on the Destination Dialog? If so, how so I do that? $TARGETDIR$ = Destination.control name.text?

Is INSTALLDIR property used at all?

Also, If I do get this to function as intended, will all files go to this location as scripted in the MSICode. If I want some files to go to other locations, do I have to edit the Install File action(s) in the MSICode.

Any information/help is GREATLY Appreciated!!!

Posted: Wed Apr 18, 2007 9:41 am
by neillans
This really does depend on your scripts, but here goes.
What if the user selects some other location on the Destination dialog. Do I simply set $TARGETDIR$ to the text of the control holding the new selection on the Destination Dialog? If so, how so I do that? $TARGETDIR$ = Destination.control name.text?
Open the dialog in the editor, and check the properties on the control (double click) - it should become obvious.
Also, If I do get this to function as intended, will all files go to this location as scripted in the MSICode. If I want some files to go to other locations, do I have to edit the Install File action(s) in the MSICode.
Correct.

Posted: Wed Apr 18, 2007 10:11 am
by Superfreak3
Oh, I think I figured out the problem. When I initially set up the Files portion of my install, I placed everything under PROGRAMFILES. My initial TARGETDIR was under PROGRAMFILES\\... , and the destination control is tied to TARGETDIR, but since my file setup is wrong, no matter what location is selected (TARGETDIR), it will always go to PROGRAMFILES.

Duh!

Sorry about that. I should have caught that much sooner. I just didn't see the TARGETDIR destination location when I initially set up my file structure.