Problems with the auto-update - Advanced Installer Community
kondriks
Posts: 36
Joined: Mon Nov 17, 2014 3:49 pm

Problems with the auto-update

I set up the installer and choose the installer mode (per-machine or per-user).
For manual update installer correctly selects the initial setup mode (read from registry from the vbs-script).
If auto-update setting mode is always selected for the per-machine.
kondriks
Posts: 36
Joined: Mon Nov 17, 2014 3:49 pm

Re: Problems with the auto-update

Why, when I install the program, then I install per-user (install path C:\Users\user\AppData\Local\Programs\My app).
But when I run the update (Setup.exe /qr ), it is always set per-machine (C:\Program Files (x86)\My app)?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Problems with the auto-update

Hi,

In order to avoid this, you can use the "Preserve Install Type of the old version" predefined custom action which preserve the install type of the older version.

To make sure this custom action will run regardless of the UI level (full, reduced, silent), you can add it after the "Searches" action group in both the "Wizard Dialog Stage" and "Install Execution Stage" sections, click on the "Advanced execution scenarios" blue link and set the "Skip action in Install Execution Stage if executed in Dialogs Stage" option.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kondriks
Posts: 36
Joined: Mon Nov 17, 2014 3:49 pm

Re: Problems with the auto-update

Thanks. Everything works correctly.
I've got one more question.
I need to start the custom action "Launch file", when the program is updated from a previous version. I add OLDPRODUCTS condition , but the custom action is not executed.
whats wrong?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Problems with the auto-update

Hi,

The condition is correct, but I'm not sure why your custom action does not start on upgrade. Can you please send us the .AIP (project file) and a verbose log of the upgrade to support at advancedinstaller dot com, so we can investigate them?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kondriks
Posts: 36
Joined: Mon Nov 17, 2014 3:49 pm

Re: Problems with the auto-update

I understood. I create temporary files before deleting previous versions of the temporary files are created, but when a new version is installed, the temporary files are missing (temporary files are not created during the upgrade). And custom action not executed.
kondriks
Posts: 36
Joined: Mon Nov 17, 2014 3:49 pm

Re: Problems with the auto-update

What to do to temporary files created during the upgrade program?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Problems with the auto-update

Hi,

In order to avoid this problem you can implement the solution described in the "Installer uninstalling temporary files on upgrade" thread.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kondriks
Posts: 36
Joined: Mon Nov 17, 2014 3:49 pm

Re: Problems with the auto-update

Thanks, Eusebiu. It worked.
Now I want to go back to the first question. I am creating an application with the installation type "Per-machine if user is administrator, per-user otherwise". If I run a program with limited rights the installer set per-user and the program is installed.
When I launch an installer with limitted privilegies (with dialog boxes) - the program is updated correctly.
But if I run the installer with a key /qr or /qn the installer requests administrator privileges.
Why? :(
kondriks
Posts: 36
Joined: Mon Nov 17, 2014 3:49 pm

Re: Problems with the auto-update

When I do a manual update of the program, the program is updated normally. When I do a silent update of the program with the key /qr or /qn, it creates another copy of the program, which is stored in this way, as the previous version.
kondriks
Posts: 36
Joined: Mon Nov 17, 2014 3:49 pm

Re: Problems with the auto-update

When I manually updating the program is installed as per-user.
When I run with /qr - program is installed as per-machine with path as per-user.
I set "Preserve Install Type of the old version" as recommended above.
kondriks
Posts: 36
Joined: Mon Nov 17, 2014 3:49 pm

Re: Problems with the auto-update

The documentation says that "Preserve Install Type of the old version" requires administrative privileges. It follows that if I run the update with limited rights, the update can not be quiet (with /qr or /qn keys)?
kondriks
Posts: 36
Joined: Mon Nov 17, 2014 3:49 pm

Re: Problems with the auto-update

Please, help.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Problems with the auto-update

Hi,

Sorry, I forgot to mention that the installation type of a "per-user, per-machine" package can be set to "per-user without administrator rights" only before the install sequence. Otherwise, you need admin rights, as mentioned for the "Preserve Install Type of the old version" custom action.

So, in order to set your package to be installed "per-user" during an upgrade with "/qr" or "qn", you need to set the following properties from command line: ALLUSERS=2 MSIINSTALLPERUSER=1

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”