joefio
Posts: 23
Joined: Thu Apr 20, 2023 2:14 pm

Check if user selects a different install path on an upgrade

If a user is running an upgrade, but they select a different directory than the default on the "Select Installation Folder" screen, I would like to exit the installation. How can I check whether or not a user has selected a different directory than the default path?
Liviu
Posts: 1042
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Check if user selects a different install path on an upgrade

Hello,
How can I check whether or not a user has selected a different directory than the default path?
I'm afraid we do not have predefined support for this. You can achieve this thourgh a custom action, for example a PowerShell script.

Also, you can simply delete the FolderDlg folder and users will no longer be able to change the path.

During an upgrade, the original path will be preserved, as the "Use original installation path when upgrading" option is checked by default on the Upgrades page.

If you want to display the FolderDlg dialog during first-time installation, but not during an upgrade, you can use the "Show only if.." option with the "NOT OLDPRODUCTS" condition from the context menu of the FolderDlg dialog.

Hope this helps! Let us know if you have any questions.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”