Installing Major update unattended without UAC? - Advanced Installer Community
R.Mueller
Posts: 202
Joined: Thu Aug 02, 2012 3:31 pm

Installing Major update unattended without UAC?

Hi,

we try to install a major update on a client system. Previously we did this with patches, and as long as they LUA compatible, this works fine.

Now we try to install a major update instead a patch: That means, the installer and all required files are downloaded to the client computer, the installer is advertised by a service running under Local System and then the main installation started with /qb+. Somewhere in the middle an UAC dialog is popping up and asking for user credentials (this happens during installation of the package).

What is the key here to get it running without UAC question?

Regards,

Roland
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Installing Major update unattended without UAC?

Hello Roland,

Unfortunately, you cannot prevent the UAC dialog from appearing when you perform a per-machine installation. Please take a look on the how to stop UAC dialog (on Vista or later)? forum thread which debates a similar subject.

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
R.Mueller
Posts: 202
Joined: Thu Aug 02, 2012 3:31 pm

Re: Installing Major update unattended without UAC?

Hi Dan,

well, this is what I was afraid off.

To sum up, if I show a user interface, the installation is running under the local user account and this will show up the UAC dialog, in opposite if I don't show up any user interface, the installation will run in background without UAC?

Advertising or not doesn't change this behavior for a per-machine installation?

Is this correct?

Regards,

Roland
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Installing Major update unattended without UAC?

Hi Roland,

You can also consider implementing the following article which involves using the Advanced Updater as a service Handle updates without elevation article.
Advertising or not doesn't change this behavior for a per-machine installation?
No, it is not related and cannot change the behavior. You can take a look on the Advertised shortcuts article to learn about advertising.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
R.Mueller
Posts: 202
Joined: Thu Aug 02, 2012 3:31 pm

Re: Installing Major update unattended without UAC?

Hi Dan,

ok, I have read your recommended article. I do not quite understand, how it helps me to install my major upgrade without UAC elevation, because the article describes installing patches. We did already something similar, and this works fine. In particular we are using a background service to install the patches, they are made LUA-ready. Unfortunately the Windows Installer limits you in a way of allowed changes in a patch, thatswhy we are forced to use a major update.

Now I want to use the same service to install a major upgrade. How can I achieve that? If advertising doesn't help, which parameters or options I have to give, to install a MSI package without UAC prompt? I assume a pure silent installation would do the job, I am right here? Which other options do I have?

Thanks for helping!

Regards,

Roland
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Installing Major update unattended without UAC?

Hi Roland,
I have read your recommended article. I do not quite understand, how it helps me to install my major upgrade without UAC elevation, because the article describes installing patches.
Please note that the related article which involves using a service to handle updates without elevation works for major updates too. It is not related just for patches.

The service which is running the “Updater” is already elevated and also it doesn't display any User Interface, so no UAC should prompt you asking for credential.

So, can you please make sure that you had followed all the steps that are described in the related article?

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
R.Mueller
Posts: 202
Joined: Thu Aug 02, 2012 3:31 pm

Re: Installing Major update unattended without UAC?

Hi Dan,

could you please help me to understand the key points of the mentioned article?
  • Configure the updater
  • Add the Advanced Installer's updater.exe as a service
  • Select the updater service and set "Start Type" to "On demand" with /runservice command line option and OnDemand Start
  • Add updater.exe as a custom action, calling the service with /configservice -name <servicename> in the "Command Line" field
  • Set this custom action to deferred execution and "Run under the LocalSystem account"
  • Disable the custom action's "Uninstall" execution stage condition leaving "Install" and "Maintenance" defaults.
  • Enable each update's "Install update without elevation" option
In other words: The AI updater.exe is added as a service to the project and configured to run on demand with the local system account. Furthermore there is some obscure configuration done with the service during first time installation.

But how and when a check for possible updates is done and when they are downloaded and installed?
Important: All .MSI updates will be executed silently with the /qn command switch. If you plan to use the updater with custom .EXE installers, you must set each update's "Command Line" field with the proprietary silent command switch from its Update Properties Tab in your updates configuration project. If not, the UI will not be shown because the updater runs as a service.
The service which is running the “Updater” is already elevated and also it doesn't display any User Interface, so no UAC should prompt you asking for credential.
In other words: the updater service is installing the updates, in case of msi packages/major update with the /qn option. That means, no user interface will be visible.

Now the important questions for me are:
  • What is triggering the updater service and how the user is informed about installation status and finalization?
  • Is there any way to get a (custom) user interface with installation status and progress?

Sorry for pester you all the time, but inplace updating and installing became a big issue in my company and we still have some trouble with it.

Thanks for helping!

Regards,

Roland
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Installing Major update unattended without UAC?

Hi Roland,
Configure the updater
You can go in the Updater page and enable the Check for updates using Advanced Updater option to bundle the auto updater with your application. Also you can take a look on the Using the updater tutorial which will guide you step by step in creating and maintaining an install package that uses the Advanced Updater.
Add the Advanced Installer's updater.exe as a service
You can go in the Services page and use the [New Service] toolbar button and select the Updater in the new appeared window.
Select the updater service and set "Start Type" to "On demand" with /runservice command line option and OnDemand Start
In the Service Parameters pane from the Service properties please select On demand option for the Start type of the service. This is happening because the service can be triggered by a schedule task or other option that has been selected .
Also, type /runservice command line parameter for the Arguments: line in the Service Context pane.
Add updater.exe as a custom action, calling the service with /configservice -name <servicename> in the "Command Line" field
Set this custom action to deferred execution and "Run under the LocalSystem account"
Disable the custom action's "Uninstall" execution stage condition leaving "Install" and "Maintenance" defaults.
In the Custom Actions page please add the predefined Launch installed file custom action with sequence and select the updater.exe.
Please edit the Command Line: to something like: /configservice -name updater.exe.

Also, please set the When the system is being modified (deferred) option for the Execution Time and also enable the Run under the LocalSystem account with full privileges (no impersonation) option for the Execution Options of the custom action.

In the Execution Stage Condition of the custom action there are options:
  • Install
  • Uninstall
  • Maintenance
Please un-check(disable) the Uninstall option, so you will only have enabled the Install and Maintenance options.

Enable each update's "Install update without elevation" option
Please create an Updates Configuration Project which allows you to create an Updates Configuration File used by the Auto Updater tool. In the Update properties tab please enable the Install update without elevation (require Updater support service) option.

But how and when a check for possible updates is done and when they are downloaded and installed?
This part is done in the Update Behavior section in the Updater page.
What is triggering the updater service and how the user is informed about installation status and finalization?
Please note that the User Interface from the “Updater” can be showed but no User Interface from the installation of the .MSI will be showed, because /qn parameter is set.
Is there any way to get a (custom) user interface with installation status and progress?
I'm afraid you cannot achieve this behavior, to display a custom User Interface during the installation status and progress.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
R.Mueller
Posts: 202
Joined: Thu Aug 02, 2012 3:31 pm

Re: Installing Major update unattended without UAC?

Hi Dan,

thanks for clarifying that.

Regards,

Roland
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Installing Major update unattended without UAC?

You're welcome Roland. If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
R.Mueller
Posts: 202
Joined: Thu Aug 02, 2012 3:31 pm

Re: Installing Major update unattended without UAC?

Hi Dan,

we decided to do a silent installation, hence it seems to be the only chance to get rid of the UAC dialog.

Cheers,
Roland
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Installing Major update unattended without UAC?

Hi Roland,

Have you noticed that on the Auto updates for non Admin users forum thread there's a sample which implement this scenario, install updates without elevation?

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

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
R.Mueller
Posts: 202
Joined: Thu Aug 02, 2012 3:31 pm

Re: Installing Major update unattended without UAC?

Hi Dan,

yes, you mentioned this article already. At the end, this is exactly what we are doing: But we are using our own service, which downloads the setup from a certain location and installs it with /qn option. The only difference to your recommendation in the article is, that we control the service from outside (not from setup) and that we have created our own service (because of better customisability).

Thanks!

Cheers,

Roland

Return to “Common Problems”