SubZero
Posts: 63
Joined: Mon Mar 14, 2011 10:29 am

Problem installing a service that needs admin rights.

Hi AI-Team,
our installation package needs admin rights to run properly which already works fine. During installation we register an update-service (which needs admin rights too, each! run). At the moment that service is registered and runs under the local system account, but that account does not necessarily have admin rights. Is it possible to install that service somehow that it always has admin rights whenever it is started without passing user credentials to it during its installation?
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Problem installing a service that needs admin rights.

Hello,
At the moment that service is registered and runs under the local system account, but that account does not necessarily have admin rights.
This is not true. If it runs under Local System account it will have full privileges.
Is it possible to install that service somehow that it always has admin rights whenever it is started without passing user credentials to it during its installation?
If you want to install a service for a specific user (not under the Local System Account), you need to follow some explicit steps. These steps are explained in the Install a service for a custom user How-To.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
SubZero
Posts: 63
Joined: Mon Mar 14, 2011 10:29 am

Re: Problem installing a service that needs admin rights.

mihai.petcu wrote:Hello,

At the moment that service is registered and runs under the local system account, but that account does not necessarily have admin rights.


This is not true. If it runs under Local System account it will have full privileges.
What we are trying to achieve is that we have a service that automatically downloads our updates and installs the update after download.So it basically runs the executable we created with advanced installer in silent mode (/qn /quiet /norestart l*v log.txt). Unfortunately if that service is registered with the local system account and it runs the *.exe we get the error 1619 and the execution of the update quits ( On Windows Vista and above!). If we use some other account (e.g. the local administrator account) the AI created executable runs without error. That's why I thought that this might be a privilege problem....do you have any other ideas what might cause the problem we are encountering using the local system account? The verbose log looks like this:

Note that I have xxed out some paths and the executable name ;).
=== Verbose logging started: 21.03.2012 09:41:27 Build type: SHIP UNICODE 4.00.6001.00 Calling process: C:\Windows\system32\msiexec.exe ===
MSI (c) (2C:20) [09:41:27:442]: Resetting cached policy values
MSI (c) (2C:20) [09:41:27:442]: Machine policy value 'Debug' is 7
MSI (c) (2C:20) [09:41:27:442]: ******* RunEngine:
******* Product: C:\Windows\System32\config\systemprofile\AppData\Roaming\xxx.msi
******* Action:
******* CommandLine: REBOOT=ReallySuppress AI_SETUPEXEPATH="C:\Program Files\xxxupdate.exe" SETUPEXEDIR="C:\Program Files\Pxxx" EXE_CMD_LINE="/exenoupdates /exelang 0 /noprereqs /qn /norestart /l*vx c:\updatexxx.log
MSI (c) (2C:20) [09:41:27:442]: Client-side and UI is none or basic: Running entire install on the server.
MSI (c) (2C:20) [09:41:27:442]: Grabbed execution mutex.
MSI (c) (2C:20) [09:41:27:473]: Cloaking enabled.
MSI (c) (2C:20) [09:41:27:473]: Attempting to enable all disabled privileges before calling Install on Server
MSI (c) (2C:20) [09:41:27:473]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s) (04:2C) [09:41:27:489]: Grabbed execution mutex.
MSI (s) (04:18) [09:41:27:489]: Resetting cached policy values
MSI (s) (04:18) [09:41:27:489]: Machine policy value 'Debug' is 7
MSI (s) (04:18) [09:41:27:489]: ******* RunEngine:
******* Product: C:\Windows\System32\config\systemprofile\AppData\Roaming\xxx.msi
******* Action:
******* CommandLine: REBOOT=ReallySuppress DISPLAYMSGBOXES="false" AI_SETUPEXEPATH="C:\Program Files\xxxupdate.exe" SETUPEXEDIR="C:\***update\" EXE_CMD_LINE="/exenoupdates /exelang 0 /noprereqs /qn /norestart /l*vx c:\updatexxx.log CURRENTDIRECTORY="C:\***\update" CLIENTUILEVEL=3 CLIENTPROCESSID=3372
MSI (s) (04:18) [09:41:27:489]: Note: 1: 2203 2: C:\Windows\System32\config\systemprofile\AppData\Roaming\xxx.msi 3: -2147287037
MSI (s) (04:18) [09:41:27:489]: MainEngineThread is returning 3
MSI (c) (2C:20) [09:41:27:489]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (c) (2C:20) [09:41:27:489]: MainEngineThread is returning 3
=== Verbose logging stopped: 21.03.2012 09:41:27 ===
SubZero
Posts: 63
Joined: Mon Mar 14, 2011 10:29 am

Re: Problem installing a service that needs admin rights.

I solved the problem!

I had to change the path in AI (Media->Bootstrapper Tab->Install Options -> Extract Location) from "[AppDataFolder][|Manufacturer]\[|ProductName] [|ProductVersion]\install" to another folder e.g." [TempFolder]\[|ProductName] [|ProductVersion]\install".

After changing this the installation worked fine using the service with the help of the local system account. So the AppDataFolder could be under some circumstances a problem I think.

Return to “Common Problems”