Path selection - Advanced Installer Community
kondriks
Posts: 36
Joined: Mon Nov 17, 2014 3:49 pm

Path selection

I need to specify the path in the installer:
1) If the user has administrative rights. (C:\Program Files\AppName)
2) If the user does not have administrative rights (WindowsDrive\AppName).

When upgrading the software must be in the path that was chosen previously.
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Path selection

Hello,

In order to change the installation path, you can change the value of APPDIR. For this you can use our predefined Set Installer property custom action.

Please keep in mind that any tasks that require administrator privileges will trigger the UAC prompt (if UAC is enabled) and the user will have to enter its credentials.

Do you want to allow the user to select the installation type at run-time or do you want to automatically configure the package depending the user who performs the installation (e.g. if the user is admin then you perform a per machine installation, otherwise if the user is not an admin, then you perform a per-user installation)?

If you want to allow the user to choose the installation type at run-time, you will need to configure your package as explain in the How do I make the package install per-user or per-machine? article.

So, changing the installation path is just a small step in order to be able to create a per user or per machine installation.
When upgrading the software must be in the path that was chosen previously.
Make sure that the Use original installation path when upgrading option is enabled in the Upgrades view. (It is enabled by default).

Please let me know if that helped.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”