PDA

View Full Version : How do you change the location for TARGETDIR???



elliottrb
09-03-2003, 02:33 PM
Can anyone please explain how to change the location for TARGETDIR? I need it to point to D:\Program Files instead of C:\Program Files. Can this be done?

Thanks,
Robbie

esiemiat
09-03-2003, 02:57 PM
TARGETDIR can be changed in the installscript like any other string variable. Type 'TARGETDIR=Path ' to change it's value. IF your trying to make it point to the 'Program Files' you can use system variable PROGRAMFILES.

elliottrb
09-03-2003, 03:34 PM
Where in the script should this be done? On Begin?

Thanks again,
Robbie

esiemiat
09-03-2003, 04:01 PM
Anywhere before the data xfer events. I ussually do this when I'm showing the dialogs in the OnUI events.

elliottrb
09-03-2003, 04:18 PM
I just added On Begin to my script and put

TARGETDIR = "D:\Program Files";

It compiled correctly but when I get to my select folder location diaglog box it still shows the old folder location. Ideally that dialog would show the correct destination location. Also, when I select my components I am seeing the old folder location instead of the new location that I set using the Destination properties dialog in the IDE. I am missing something but can't figure out what just yet.

Thanks again for your input.

FYI, the full destination location will be D:\Program Files\Company Name\Application Name\*.* and some subfolders.

Robbie

esiemiat
09-03-2003, 04:21 PM
Check your OnFirstUIBefore event to make sure it isn't being reset in there. Also what are you passing to that dialog? Is it TARGETDIR or some other variable? If your passing a different variable then make sure to set it equal to TARGETDIR prior to the dialog.

elliottrb
09-03-2003, 04:58 PM
I found it. It was getting set inside a function. I set it there and all is good.

Thanks,
Robbie