cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Jason_Sanborn
Level 3

INSTALLDIR not updating subfolder locations

I have a project that allows the user to change the INSTALLDIR. I have components that add folders to the project based on the value of INSTALLDIR. When the user changes the location of INSTALLDIR, the files for INSTALLDIR gets installed into the directory they specify, but any subfolders and contents of those subfolders gets installed in the default location.

Example:
INSTALLDIR Default Value: C:\Program Files\MyCo\MyApp\
Component Program: [INSTALLDIR]
Component Data: [INSTALLDIR]Data

User sets INSTALLDIR to C:\PApp during installation
INSTALLDIR changes to: C:\PApp
Program installs to C:\PApp
Data installs to C:\Program Files\MyCo\MyApp\Data
It should install to: C:\PApp\Data

Any ideas?
Labels (1)
0 Kudos
(2) Replies
jchristman
Level 8

I have not seen this one yet, my latest takes all the files that should be going into [installdir]myappdir/files just dumps everything into [installdir] so it is [installdir]files so instead of have c:\myapp\itsfiles or c:\program files\myapp\itsfiles it is more like c:\itsfiles.
0 Kudos
Jason_Sanborn
Level 3

I finally discovered the error. I was forgetting to set the event: SetTargetPath to set and update the target.

My problem was that I was using a custom dialog I created for updating the path. I had set up a Property "_Browse_InstallDir" which was set to INSTALLDIR. On the dialog for the edit box, I set the Indirect Property to True. What I had forgotten was to put the event on the Next button.

Event: SetTargetPath
Argument: [_Browse_InstallDir]
Condition: 1

Once I did that, everything worked as expected.
0 Kudos