Existing per-user/per-machine mode not used by default when upgrading - Advanced Installer Community
59412
Posts: 1
Joined: Sat Jan 09, 2016 8:33 pm

Existing per-user/per-machine mode not used by default when upgrading

Upgrade settings: "Automatically upgrade older versions" + "Use original installation path when upgrading".
Install type: "Per-machine if admin, per-user otherwise".

If user has installed ver 1 per-user and then runs installer of ver 2, ver 2 installer's InstallTypeDlg defaults to per-machine installation and if installation is finished, user ends up with both versions installed.

If installer detects existing version installed per-user then it should default to per-user in InstallTypeDlg. Othewise it is very easy to end up having multiple versions installed by just pressing Next in installer.

Also, if user has existing version as per-user and then decides to install ver 2 as per-machine, currently existing per-user install is not removed when ver 2 is installed as per-machine.
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Existing per-user/per-machine mode not used by default when upgrading

Hello and welcome to Advanced Installer forums,

Indeed, this step should be done automatically by Advanced Installer. I have added this improvement on our TODO list and it will be available in a future version of Advanced Installer. Thank you for your suggestion.

As a workaround, you can set a property with the selected value and save it in the registry. During an upgrade, you will retrieve its value and set the AI_InstallPerUser property. The AI_InstallPerUser is set as follow:
  • 1 - Only for me ([LogonUser]) option was selected
  • 0 - Everybody (all users) option was selected
By default, a per-user installation cannot upgrade a per-machine installation and a per-machine installation cannot upgrade a per-user installation. However, you can try using a Preserve Install Type of the old version predefined UI custom action.

To uninstall the older versions of your product, no matter what Installation Type they use (per-user or per-machine), you can use the predefined Uninstall previous versions custom action.

If there is anything else I can help you with, please let me know.

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

Return to “Common Problems”