sstrader
Posts: 11
Joined: Mon Dec 04, 2017 1:50 pm

Upgrading an install for all users

Mon Dec 04, 2017 2:32 pm

I'm having an issue upgrading an installation on Windows Terminal Server when installing as an administrator for all users.

The initial installation is run manually from the executable. The upgrade is initiated by the installed application, but with the flags /qn+ (no UI until completion). The installer UI has two options based on a checkbox (setting the property ALLUSERS): install for the current user or install for all users. When "install for all users" is unchecked, the install path is "C:\Users\%user%\AppData\Roaming". When it is checked, the install path is "C:\Program Files (x86)". The installer script uses three custom actions to attempt to accomplish this, all run after the Installation Execution Stage "Searches":

1. Set APPDIR to [APPDIR] for "Install, First time install" or "Uninstall, Regular uninstall" if ALLUSERS = "".
2. Set APPDIR to [ProgramFilesFolder]\[Manufacturer]\[ProductName] for "Install, First time install" or "Uninstall, Regular uninstall" if ALLUSERS = 1.
3. Set APPDIR to [ProgramFilesFolder]\[Manufacturer]\[ProductName] for "Install, Upgrade" or "Uninstall, Replaced by a new version" if TerminalServer = 1.

1 and 2 are intended for the manual, UI install. 3 is intended for the upgrade.

The regular install/upgrade works, but the all users upgrade ends up creating a new installation in the default APPDIR ("C:\Users\%user%\AppData\Roaming"). How can I get the silent upgrade to work for all users?

Thanks,
Scott

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: Upgrading an install for all users

Thu Dec 07, 2017 10:39 am

Hello Scott,

You should make sure that during a silent installation you also set the check box property (used to set ALLUSERS) by command line. Something like this:

Code: Select all

msiexec /i setup.msi /qn+ CHECKBOX_PROP="all users value"
Also, if you want the value of the CHECKBOX_PROP property be preserved from first time install to upgrade, then you can go to "Install Parameters" page and enable the "Set persistent property" option for your property.

Let us know if this helped.

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

sstrader
Posts: 11
Joined: Mon Dec 04, 2017 1:50 pm

Re: Upgrading an install for all users

Tue Dec 12, 2017 8:58 pm

Daniel,

Thanks so much for the help! I got pulled away on another project but finally got back to installer fun.

I made changes according to your suggestions and that resolved the issue where two installs were created on upgrade. However, I'm seeing two additional issues. One I've resolved, one I haven't.

The first was very minor: during a shared install the admin's Roaming installation folder would get a separate, empty subfolder for each version (e.g. appname\1.2.3\install and appname\1.2.4\install). To fix it, I edited the aip as xml and removed [|ProductVersion] from the ExtractionFolder value. I looked "everywhere" in the UI to change that but couldn't find anything, so just went to the raw data.

The second item I could not resolve: after the upgrade, there are uninstall entries in Control Panel for each version. I read through this thread without any luck: viewtopic.php?t=20344. "Product Details \ Override Windows Installer programs list entry" is not checked and the upgrade code has not changed. Any further suggestions?

Thanks again,

Scott

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: Upgrading an install for all users

Wed Dec 13, 2017 4:07 pm

Hello Scott,

Regarding the first issue, the related change can be done from our "Builds" page -> "Configuration" tab -> "Extract location" field. As a best practice for the future I just want to add a small note that we do not advise at all to manually edit (without using the AI application) our AIP project file. Manually edits could lead to broken projects. However, since your project was successfully built this was not the case for you this time. :)

Regarding the second issue, this could happen if you increase only the fourth field of you "ProductVersion". You can check this from "Product Details" page. If this is the case you should follow our "How do I remove the old version when using the fourth field of the Product Version?" article steps.

If this is still of no help please send us the AIPs (project files) of your old and new version to support at advancedinstaller dot com so we can investigate them.

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

sstrader
Posts: 11
Joined: Mon Dec 04, 2017 1:50 pm

Re: Upgrading an install for all users

Mon Dec 18, 2017 5:10 pm

First, thanks for the guide through the UI. That worked perfectly.

Second, no luck with the version changes. I'll send you the AIPs.

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: Upgrading an install for all users

Tue Dec 19, 2017 4:01 pm

Hello Scott,

You are always welcome.

Regarding the second issue, I tested your setup packages installation (after building them with dummy resources) but I cannot replicate the behavior. Could you consistently replicate the behavior? If so could you send us a test case which we can use?

Also, maybe you could send us by email a download link for your built setup package so we can fully test them on our side too.

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

Return to “Building Installers”