Installing a Service on Server 2012 R2 - Advanced Installer Community
adamdc78
Posts: 76
Joined: Wed Mar 19, 2014 7:42 pm

Installing a Service on Server 2012 R2

We've got an installer that works for us locally, but is having issues at a site off-continent. In both cases we're running Server 2012 R2, but on the remote site, we get the dreaded (and often very unaccurate) Error 1923 when trying to install the service using AI's Services tab. I mention this only because using the command line while the installer is displaying that modal, sc allows me to create the service with the correct user account and password, after which I can successfully start the service. This is definitely not a permissions issue.

I have only limited access to this client's machine, so troubleshooting is difficult, but I will try to get a special build of the installer which scripts the installation of the service and see whether that has any luck.

* I know that UAC has elevated the installation because it copies to Program Files.
* I have verified that the user has the logon as a service permission.
* The Wait Until the Service Completes checkbox is checked, although the service isn't being installed, so I'm not sure that the control operation is relevant.
* The machine is being accessed through TeamViewer; I'm not sure whether there are restrictions imposed there, but they have installed another of our products which also installs a service in the same manner without issue.

The Event Logs have nothing useful to offer, just that the error code is 1923. I've included the relevant part of the MSI log below, but changed the names:
MSI (s) (9C:3C) [21:08:47:035]: Executing op: ServiceInstall(Name=MyServiceName,DisplayName=My Service Name,ImagePath="C:\Path\To\Exe\MyServiceName.exe",ServiceType=16,StartType=2,ErrorControl=32769,,Dependencies=[~],,StartName=User@domain.local,Password=**********,Description=Description Goes Here,,)
MSI (s) (9C:3C) [22:59:39:430]: Product: My Service Name -- Error 1923. Service 'My Service Name' (MyServiceName) could not be installed. Verify that you have sufficient privileges to install system services.

MSI (s) (9C:3C) [22:59:41:649]: Product: My Service Name -- Error 1923. Service 'My Service Name' (MyServiceName) could not be installed. Verify that you have sufficient privileges to install system services.

MSI (s) (9C:F0) [23:52:03:349]: I/O on thread 3580 could not be cancelled. Error: 1168
MSI (s) (9C:F0) [23:52:03:349]: I/O on thread 396 could not be cancelled. Error: 1168
MSI (s) (9C:F0) [23:52:03:349]: I/O on thread 3900 could not be cancelled. Error: 1168
MSI (s) (9C:F0) [23:52:03:349]: I/O on thread 2268 could not be cancelled. Error: 1168
MSI (s) (9C:3C) [23:52:03:349]: Product: My Service Name -- Error 1923. Service 'My Service Name' (MyServiceName) could not be installed. Verify that you have sufficient privileges to install system services.

Action ended 23:52:04: InstallExecute. Return value 3.
MSI (s) (9C:3C) [23:52:04:974]: Note: 1: 2265 2: 3: -2147287035
Is there something that the Services To Install entry does or doesn't do that sc.exe doesn't or does?

The command I'm using is (I'm using shorthand, I have to build a string to Run via vb script):

Code: Select all

sc create MyServiceName DisplayName= "My Service Name" binpath= "[APPDIR]MyServiceName.exe" start= "auto" obj= "User@domain" password= "SomePassword"
Very perplexed at this point as I can reproduce it on their machine but not my own (my own is accessed via RDP rather than TeamViewer).

Thank you,

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

Re: Installing a Service on Server 2012 R2

Hi Adam,

That's odd since you cannot replicate this on your end.

What you can try is to manually try to install the service on the related machine, outside the installation package and see if the behaviour still persist.
Also, did you checked the Windows Event Log? Are there additional information about the error?

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
adamdc78
Posts: 76
Joined: Wed Mar 19, 2014 7:42 pm

Re: Installing a Service on Server 2012 R2

UPDATE: It turns out their system would not allow setting the username by UPN for the service startup, which was causing the failure (when running the script manually I used domain\name instead, although the service would stop immediately). Looks like it's a configuration issue with their server.

Return to “Common Problems”