cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
filippoesposto
Level 2

Programmatically change destination folder path

Hi all,
we need to change the beaviour of change Destination Folder dialogs in order to change and show a custom destination path.
If user change folder to c:\app\ we want to show in the destination folder path c:\app\V8 .
Is it possbile? Can you help us ?
Redards
Filippo esposto.
Labels (1)
0 Kudos
(1) Reply
phill_mn
Level 7

I started to implement code along this line for a MSI project (which I never completed). But what I learned so far is:

1) Create your directory tree and define a Property related to the Directory.
2) Create a custom action which:
Calls MsiGetTargetPath to get what the dialog just set.
Parses the path, and append the folder.
Call MsiSetTargetPath.
Call MsiSetProperty.

3) schedule the CA as a DoAction (Immediate Execution) called by a control on your dialog.

4) You will need to make sure that you do not call MsiSetTargetPath if resources have already been installed to that location, but you will also want to add a custom action to the Execute Sequence so that if your package is run without a UI there is a similar change.

Good luck!
0 Kudos