NannoW
Posts: 7
Joined: Wed Apr 12, 2017 12:03 pm

CommonAppDataFolder

Hi,

does anybode know how I can (dymamicly) add the ProgramData folder to a propety at startup? I've tried different thinks but didnot succeed.
Capture.PNG
Capture.PNG (4.79 KiB) Viewed 2970 times
Yours Nanno.
Daniel
Posts: 8279
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: CommonAppDataFolder

Hello Nanno and welcome to our forums,

In order to set you custom property you can use a "Set installer property" custom action with sequence. You can achieve that by following these steps:

1. Go to "Custom Actions" page.
2. Create a "Set installer property" custom action with sequence under "Install Execute Stage -> Searches" and with "Shift" key pressed drag and drop it under "Dialog Execute Stage -> Searches" too.
3. Set the "Value" field to the path of your .config file, for instance:

Code: Select all

[CommonAppDataFolder]AppSettings.Config.txt
4. In the right pane expand the "Execution Stage Condition" section and click on the "Advance execution scenarios..." hyperlink and select the "Skip action in Install Execution Stage if executed in Dialogs Stage" option.

You can't use a ProgramData reference in the "Value" field of your property in "Install Parameters" page because this field supports only pseudo-formatted references. Any other reference will be interpreted as plain text.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”