Redirecting Files?

Got a problem you cannot solve? Try here.
Post Reply
Superfreak3
Posts: 61
Joined: Tue Feb 06, 2007 9:13 am

Redirecting Files?

Post 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!!!
neillans
Posts: 536
Joined: Sat Nov 04, 2006 6:21 am
Location: Scottish Borders, UK

Post 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.
Andy Neillans
Superfreak3
Posts: 61
Joined: Tue Feb 06, 2007 9:13 am

Post 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.
Post Reply