Make the latest folder stick when changing folder in browse. - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

MindTooth
Posts: 37
Joined: Mon Aug 17, 2009 12:40 am

Make the latest folder stick when changing folder in browse.

Hello,

Just wanted to know if it was possible to make the last folder stick, so I would always get /SomeFolder/ at the end even when I change parent directory? This is in the browse windows. (Followed this tutorial.)

OT: I need to add the browse feature. Since the search thing ain't.

Any reply is much appreciated.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Make the latest folder stick when changing folder in browse.

Hello,

1) Go to "Install Parameters" page and set a property named FIXEDFOLDER with the value "SomeFolder" without the quotes

2) Go to "Custom Actions"
a) Right click InstallUISequence and select "Show Standard Action"->"MigrateFeatureStates"
b) Right click "MigrateFeatureStates" and select "New Custom Action"->"Property Set with Formatted"
c) Fill in the property's fields like this:

Code: Select all

   Property Name: BACKUP_DIR
   Formatted Text: [APPDIR]
   
e) Right click the custom action added at step b) and select "New Custom Action"->"Property Set with Formatted"
f) Fill in the property's fields like this:

Code: Select all

   Property Name: APPDIR
   Formatted Text: [APPDIR][FIXEDFOLDER]\
   
3) Go to "Dialogs" page

4) Select the "Browse..." button from the FolderDlg Dialog then go to "Published Events" tab and make sure there are three events in this exact same order:

Code: Select all

Event                 Argument                        Condition
[APPDIR]              [BACKUP_DIR]                    AI_INSTALL AND BACKUP_DIR
[_BrowseProperty]     APPDIR                          1
SpawnDialog           BrowseDlg                       1
Note that the first one you will have to create, then use the "Up" button to move it first in the stack.

5) Select BrowseDlg Dialog, select the "OK" button from this dialog then go to "Published Events" tab and make sure there are four events in this exact same order:

Code: Select all

Event                 Argument                        Condition
[SetTargetPath]       [_BrowseProperty]               1
[EndDialog]           Return                          1
[BACKUP_DIR]          [APPDIR]                        1
[APPDIR]              [BACKUP_DIR][FIXEDFOLDER]\      1
Note that the last two events will have to be manually created. Use the "Up" and "Down" buttons to achieve this exact same order.

Please note that this can only be achieved in an Enterprise project.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
MindTooth
Posts: 37
Joined: Mon Aug 17, 2009 12:40 am

Re: Make the latest folder stick when changing folder in browse.

Your reply is very much appreciated :D However, I didn't get it to work. So I will try to re-create my project from scratch. Should I follow your steps in conjure with this tutorial, or is it unneeded?

Birger :)
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Make the latest folder stick when changing folder in browse.

Hi,

I have again tested my guidelines step by step, creating a project from scratch, and it worked. Just make sure you followed my steps precisely, maybe you misspelled something. You do not need the tutorial.
If you still can not get it to work please send your aip project file to support at advancedinstaller dot com so I can investigate the problem.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”