codemonk3y
Posts: 62
Joined: Thu Nov 01, 2012 3:51 pm

Updater runs as a server but asks for admin access

I have install the updater installed as a server, so it has admin rights.

Our old version was installed using Wise Installer. I have a custom action "Configure MSI With Specific ProductCode" with MSI={product code} and Command line: REMOVE=ALL.
I also have a search that checks for the product code, so my condition is that search.

The updater downloads my msi and during the installation i get: "Error 1730. You must be an Administrator to remove this application. To remove this application, you can log on as an Administrator, or contact your technical support group for assistance."
codemonk3y
Posts: 62
Joined: Thu Nov 01, 2012 3:51 pm

Re: Updater runs as a server but asks for admin access

When the updater runs on Win7 it prompts UAC so it can perfom the uninstall of the old software.
codemonk3y
Posts: 62
Joined: Thu Nov 01, 2012 3:51 pm

Re: Updater runs as a server but asks for admin access

the config file aip file was missing the "Install without elevation"

Now it works on XP, but fails in win7
The msi is set to have Limited user interaction.

The error from the install log is:

Machine policy value 'AlwaysInstallElevated' is 0
MSI (s) (30:34) [15:54:21:414]: User policy value 'AlwaysInstallElevated' is 0
MSI (s) (30:34) [15:54:21:414]: MSI_LUA: Elevation required to install product, will prompt for credentials
MSI (s) (30:34) [15:54:21:414]: MSI_LUA: Entering Credential Request. hwnd = 590254, MsiAction = 2, productname = myapp, version = 1.0.0, language = 1033, manufacturer = CheckFree Corporation
MSI (s) (30:34) [15:54:21:414]: MSI_LUA: (continued)... packagepath = C:\Windows\Installer\25b251.msi, packagesource = C:\Windows\Installer\25b251.msi, dwUpdates = 0
MSI (s) (30:34) [15:56:29:958]: MSI_LUA: Credential Request return = 0x800704C7
User cancelled installation.
C:\Windows\Installer\25b251.msi
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Updater runs as a server but asks for admin access

Hello,

I'm afraid I don't full y understand your scenario. Can you give us more details about this (maybe exemplify)? Also, can you please send us the .AIPs (project files) of your upgrade, upgraded and updates configuration project to support at advancedinstaller dot com so we can investigate them? Also, can you please send us a verbose log of the upgrade installation?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
codemonk3y
Posts: 62
Joined: Thu Nov 01, 2012 3:51 pm

Re: Updater runs as a server but asks for admin access

i sent it all to you, let me know if you need more info.

Thanks,
Scott
codemonk3y
Posts: 62
Joined: Thu Nov 01, 2012 3:51 pm

Re: Updater runs as a server but asks for admin access

this seems to be working now in Win7. I changed the Command Line in the Config File project from /qr to /qn. Why does it fail for access issues as qr? I'd like the client to be able to see the progress from a minimal ui, otherwise they just see the download / installing screen and have no idea if it's installing or if the install crashed.

I have found that if the command line is bad the install never launches and the Update / download screen just sits there forever telling you it's installing. It would be nice if it told you it couldn't launch the install or at least told you it didn't work.

Thanks,
Scott
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Updater runs as a server but asks for admin access

Hello Scott,

Please keep in mind that in order to handle updates without elevation you should carefully follow our "How to handle updates without elevation?" article steps. I've have observed that your sent .aip is not configured properly (e.g. the updater service "Start Type" is not "On demand", the updater service control operation "On install" -> "Start" is not disabled, the updater.exe is not launched using a "Launch installed file" custom action with sequence). So, you should configure accordingly your installation project file in order to achieve what you want.
this seems to be working now in Win7. I changed the Command Line in the Config File project from /qr to /qn. Why does it fail for access issues as qr? I'd like the client to be able to see the progress from a minimal ui, otherwise they just see the download / installing screen and have no idea if it's installing or if the install crashed.
I'm afraid this is our default implementation. In order to install updates without elevation the updates installation package should be launched only in silent mode. Also, when the updates package silent installation fails, the user will be notified by the updater (in the "Installing Updates" updater dialog) that the updates installation failed. If the updates installation will succeeed, then the updater will exit automatically.
I have found that if the command line is bad the install never launches and the Update / download screen just sits there forever telling you it's installing. It would be nice if it told you it couldn't launch the install or at least told you it didn't work.
Indeed, this is an Advanced Installer limitation. It is quite difficult for us to validate the command line. We are aware of it and we will try to add an improvement for this in a future version of Advanced Installer. However, in order to avoid this issue you should make sure you use a proper command line for the updates package.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
codemonk3y
Posts: 62
Joined: Thu Nov 01, 2012 3:51 pm

Re: Updater runs as a server but asks for admin access

We currently have the updater on client machines and it's installed as a service and started. We call it from code for everything. In our new msi I tried changing the updater to the settings from your posted link, but the custom action gives me the below error during install. If I remove the custom action the updater has no problem installing my msi.

MSI (s) (04:C0) [00:52:38:018]: Doing action: InstallInitialize
Action ended 0:52:38: WiseAltStartup. Return value 1.
MSI (s) (04:C0) [00:52:38:018]: Machine policy value 'AlwaysInstallElevated' is 0
MSI (s) (04:C0) [00:52:38:018]: User policy value 'AlwaysInstallElevated' is 0
MSI (s) (04:C0) [00:52:38:018]: MSI_LUA: Elevation prompt disabled for silent installs
MSI (s) (04:C0) [00:52:38:018]: Note: 1: 1730
Action start 0:52:38: InstallInitialize.
MSI (s) (04:C0) [00:52:38:018]: Product: myapp -- Error 1730. You must be an Administrator to remove this application. To remove this application, you can log on as an Administrator, or contact your technical support group for assistance.

Error 1730. You must be an Administrator to remove this application. To remove this application, you can log on as an Administrator, or contact your technical support group for assistance.
Action ended 0:52:38: InstallInitialize. Return value 3.
Action ended 0:52:38: INSTALL. Return value 3.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Updater runs as a server but asks for admin access

Hello,

I'm not sure why this happens. If you are using a "Configure MSI with specific Product Code" custom action in order to remove your previous installations packages, then please keep in mind that this type of custom action has been deprecated and it is not recommended to use it. In order to remove the older versions of your installation package you can simply add their Upgrade Code in the "Upgrades" page of your current installation project. Please take a look on our "Upgrade an older version of the package" how to which should be useful for you.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
codemonk3y
Posts: 62
Joined: Thu Nov 01, 2012 3:51 pm

Re: Updater runs as a server but asks for admin access

Would it be possible to make a patch msi that only updates the service to your recommended settings? Would the service still have permission to do that?

What does /configservice -name <servicename> actually do? Is it something I can set through the registry?

My msi is changing the service to run your recommended way. How do I verify it's installed this way?
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Updater runs as a server but asks for admin access

Hello,
Would it be possible to make a patch msi that only updates the service to your recommended settings? Would the service still have permission to do that?
Unfortunately, this is not possible.
What does /configservice -name <servicename> actually do? Is it something I can set through the registry?
No, you cannot set this outside of installation project. The related custom action will configure the installed updater file and should run during installation package.
My msi is changing the service to run your recommended way. How do I verify it's installed this way?
When the updater is configured as in our "Handle updates without elevation" article you will be able to install updates from any user account (admin or standard) without the common UAC elevation.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
codemonk3y
Posts: 62
Joined: Thu Nov 01, 2012 3:51 pm

Re: Updater runs as a server but asks for admin access

I figured out the Error 1730. We have an install that we sent to all of our clients that just installs the update service. If the service installer is launched from our application everything works fine. If the service installer is double clicked by any admin user, we get the Error 1730 during the updates.


I have run into a new problem now. On Windows 8 machines, during the install I get "Product: myapp -- Error 2753. The File 'updater.exe' is not marked for installation." The custom action to configure the updater is called updater.exe and it's configured just like your link says. This happened on a windows 8 x64 machine.

Action ended 15:14:35: PublishProduct. Return value 1.
MSI (s) (58:64) [15:14:35:332]: Doing action: updater.exe
Action start 15:14:35: updater.exe.
MSI (s) (58:64) [15:14:35:332]: Note: 1: 2753 2: updater.exe
MSI (c) (38:74) [15:14:35:332]: Font created. Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg

Error 2753. The File 'updater.exe' is not marked for installation.
MSI (s) (58:64) [15:15:01:821]: Product: myapp -- Error 2753. The File 'updater.exe' is not marked for installation.

Action ended 15:15:01: updater.exe. Return value 3.
MSI (s) (58:64) [15:15:01:821]: Note: 1: 2265 2: 3: -2147287035
MSI (s) (58:64) [15:15:01:821]: Machine policy value 'DisableRollback' is 0
MSI (s) (58:64) [15:15:01:821]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
MSI (s) (58:64) [15:15:01:837]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
MSI (s) (58:64) [15:15:01:837]: Calling SRSetRestorePoint API. dwRestorePtType: 13, dwEventType: 103, llSequenceNumber: 45, szDescription: "".
MSI (s) (58:64) [15:15:01:837]: The call to SRSetRestorePoint API succeeded. Returned status: 0.
MSI (s) (58:64) [15:15:01:837]: Unlocking Server
Action ended 15:15:01: INSTALL. Return value 3.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Updater runs as a server but asks for admin access

Hello,

This error usually occurs when a custom action try to access a file which hasn't been installed. This may happen because you have enabled the "Install new version first and then uninstall old version" option from "Upgrades" page. Please keep in mind that this option can be used only when the files components don't change from the old version to the new one (their names and GUIDs remain the same). Also, this option requires that your project fulfills some specific windows installer upgrades rules.

However, can you please enable the "Uninstall old version first and then install new version" option from "Upgrades" page and see if the behavior still persist?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
codemonk3y
Posts: 62
Joined: Thu Nov 01, 2012 3:51 pm

Re: Updater runs as a server but asks for admin access

This only happens on a couple random Windows 8 machines. I just tried it this morning on a different windows 8 vm and it works fine.

I can try it, but we need the old one uninstalled 2nd.
codemonk3y
Posts: 62
Joined: Thu Nov 01, 2012 3:51 pm

Re: Updater runs as a server but asks for admin access

On the same machine I have uninstalled the old version manually and I still get the same error from the install.

Return to “Common Problems”