ErnestoCN
Posts: 2
Joined: Thu May 14, 2020 12:35 am

Conditional installation path

Hi!
I am new to handling advanced installer, in my project I need to set the installation path depending on the privileges that the user has, if he is an administrator, the path of program files appears by default, if he is not an administrator, a different path, this on the Instalation folder screen.
I have tried to change the parameter of APPDIR but I could not do it, could you help me how could I do this?
I am using version 15.0.1
Catalin
Posts: 6592
Joined: Wed Jun 13, 2018 7:49 am

Re: Conditional installation path

Hello and welcome to our forums,

To achieve that, you can go to "Install Parameters" page in your project and set the "Installation Type" to "Per machine if user is administrator, per user otherwise".

The above mentioned option is meant to work with a predefined dialog of ours. To add this dialog, please go to "Dialogs" page, select the "WelcomeDlg" dialog and press on the "Add Dialog" button from the toolbar. From the list, please select the "InstallTypeDlg".

This way, based on what the user chooses, the Application Folder will be set accordingly (to Program Files if the user has admin rights, to %appdata% otherwise).

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ErnestoCN
Posts: 2
Joined: Thu May 14, 2020 12:35 am

Re: Conditional installation path

Thx Catalin, it works
is possible put something like "c:\[Manufacturer]\[appName]" instead of %appdata%?
Regards
Ernesto
Catalin
Posts: 6592
Joined: Wed Jun 13, 2018 7:49 am

Re: Conditional installation path

Hello Ernesto,

You are always welcome!
is possible put something like "c:\[Manufacturer]\[appName]" instead of %appdata%?
Unfortunately, not. The %appdata% folder is chosen when the installation type is of "per-user" type and when we "suppose" that the user does not have administrative privileges. Please keep in mind that the "C:\" location requires administrator privileges.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”