14

We have created a custom windows service. The deployment package is done in InstallShield and the installation prompts for the user name and password for the service Log On account.

We have had no issues at all installing on various Windows 7 (Professional) and Windows 8 machines, but we get the 1920 error when trying to deploy to a Windows 7 Ultimate machine. We have not yet confirmed whether the issue is to do with the OS or the specific machine that we are trying to install this on.

The installer is always run by right-clicking and "Run as Administrator", and the users (both, the user running the installer and the Logon User for which the credentials are supplied) are administrators on the machine. Usually the logged in user installing the service, and the Logon user running the service are the same.

Here are the things we have tried.

  1. Verified the Logon user is a member of Administrators.
  2. Verified the user account settings are exactly the same as another machine where it works.
  3. Verified from Control Panel - Administrative tools - Local Security Policy - Local Policies - Security Options = that these again match machine where it works.
  4. Ensured that all windows updates have been applied.
  5. Verified that the Windows Management Instrumentation Service is running. Restarted it.
  6. Rebooted the machine, then tried again.
  7. Added "generatePublisherEvidence" element in the service configuration file. (Service failed to start error 1920)

But none of the above work.

Hope that someone else has come across a similar issue and has a fix..

UPDATE:

I have also tried the following:

  • Open SecPol.msc
  • Navigate to Local Policies/User Rights Assigment
  • Find "Log on as a service" policy and add the service account
riQQ
  • 9,878
  • 7
  • 49
  • 66
smitra
  • 597
  • 3
  • 6
  • 18
  • Had the same error when removing Adobe. The Print spooler service was disabled. Changed it to manual and the uninstall worked. – IT_User Dec 30 '21 at 23:17

10 Answers10

16

1920 is a generic error code that means the service didn't start. My hunch is this:

http://blog.iswix.com/2008/09/different-year-same-problem.html

To confirm, with the installer on the abort, retry, ignore, cancel dialog up... go into services.msc and set the username and password manually. If you get a message saying the user was granted logon as service right, try hitting retry on the MSI dialog and see if it starts.

It could also be missing dependencies or exceptions being thrown in your code.

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
  • Thanks for the quick response. I tired the above, and do not get a message saying the user was granted logon as service rights. Also, something that I should have mentioned in my original question - that we do automatically do this in install script by running ntrights. – smitra Nov 19 '13 at 01:02
  • 2
    Do you have any dependencies on files in the GAC or WinSXS cache? This can cause a race condition. What I normally do is take the ServiceControl record and just let the product get installed. Then try to start manually after and/or attach a debugger to profile the service. Once you figure it all out you can put the ServiceControl record back in. – Christopher Painter Nov 19 '13 at 02:28
  • 2
    I had (wrongly) assumed that the InstallShield installer was checking for the framework 4.5 dependency. It was not. It checked upto 4.0, but not 4.5. Installing framework 4.5 on the machine resolves the issue. – smitra Nov 19 '13 at 04:14
  • Missing dependency it is! – Vaiden Jul 14 '16 at 14:09
  • 1
    @smitra How come reentering the same user logon details explicitly from `services.msc` console fixes the missing dependency issue if at all that is the case? – RBT Feb 01 '17 at 10:59
  • Did you get a message saying the user was granted logon as service right? – Christopher Painter Feb 01 '17 at 12:00
  • What are the other options I can pass for Account=??? I have tried LocalSystem,.\LOCAL_ACCOUNT, [SERVICEACCOUNT] but still no luck. I am getting " privileges to start system " message – kudlatiger Aug 01 '18 at 06:02
  • 2019 and still having these issues... @ChristopherPainter: could you expand on your race condition comment? You mean a race between a GAC component installing and your service installing concurrently? – Paul Oct 03 '19 at 16:13
  • 1
    Installing the service isn't the problem starting the service is. The race condition is the service attempts to be started prior to the assembly being installed to the GAC. `But Chris... how can this be?? I see that PublishAssemblies is scheduled before StartServices!!` True... but StartServices is running in deferred execution and PublishAssemblies is doesn't actually publish the service until commit phase of installation which is after all the deferred actions. – Christopher Painter Oct 03 '19 at 18:10
  • @Paul PS- Consulting services are available if you just want a little help getting over the finished line or more. – Christopher Painter Oct 03 '19 at 18:10
4

I also had the same issue. I fixed this by installing the .NET framework version 4.5.

hichris123
  • 10,145
  • 15
  • 56
  • 70
Mark
  • 49
  • 1
3

Make sure all services windows are closed before starting install/uninstall

Markus
  • 1,020
  • 14
  • 18
  • By `services windows` you mean services console (`services.msc`) from where we manage service status? – RBT Feb 01 '17 at 11:05
  • it does not make any difference in windows 10 ent... it depends on msi/ism, I was able to install services with open service window and after refreshing it new service appeared. after that i changed some ism properties and now it complains with 1920 err – Sasha Bond Dec 24 '20 at 18:45
  • I have noticed this issue in Windows 10 professional - note the problem only shows up rarelyl, like .1% of the time. – Markus Dec 02 '21 at 08:35
3

In my case I had to delete the services in my installshield project and start from square one. My original service components were added manually and I couldn't get them working, the only error I was getting was the same "Error 1920 service failed to start. Verify that you have sufficient privileges to start system services." that you were getting. After deleting my components, I re-added them using the component wizard.
enter image description here

Component Wizard looks like this

I actually had to create two new components. One was of type "Install Service".

Service Component type shown here

enter image description here

The other component I had to add was of "Control Service" type.

enter image description here

I had to choose the service that I had setup when I added the Install Service component.enter image description here

After that it worked, even though nothing looked differently from the components I had added manually. Installshield must do something behind the scenes when it wires up the service components with the component wizard.

All of this was with Install Shield 2016.

nicko
  • 460
  • 3
  • 11
  • 1
    I spent a couple of hours trying to overcome this with manual service config. Recreating service with wizard solved the issue. And I didn't find any difference in fields before and after. Strange. Thanks. – Vlad Jul 22 '20 at 02:08
2

Workaround: This is a problem we have observed too, in Windows Server 2012 R2. I haven't found a reason or solution yet. Here is my work around.

During installation while error is shown, go to Services.msc. Find the service which throws the error, then re-enter the password in the service's log-in information. Then, hit "retry" in setup. It works.

The error will not be shown for same user again. But will be shown for a different user.

Vishnu Prasanth
  • 149
  • 1
  • 5
2

Open Event Viewer go to window logs->Application and look at the errors prior to this error it will give you the actual error you looking to solve

Teezy7
  • 515
  • 5
  • 9
1

In my case, the service failed to start because I didn't set Platform='x64' in the wix file.

I saw these errors in Event Viewer:

Service cannot be started.

System.BadImageFormatException: Could not load file or assembly 'SOME_LIBRARY_FILE, Version=5.0.0.0, Culture=neutral, PublicKeyToken=33345856ad364e35' or one of its dependencies.

I tried checking the bitness of all service related files using CorFlags.exe. When I changed my installer to be 64 bit, everything started working fine.

Community
  • 1
  • 1
1

Check service dependencies if they are disabled.

Set those dependencies to Automatic, Start them and it should work.

Ivan Chau
  • 1,403
  • 1
  • 18
  • 28
0

I found this answer on another site but it definitely worked for me so I thought I would share it.

In Windows Explorer: Right Click on the folder OfficeSoftwareProtection Platform from C:\Program Files\Common Files\Microsoft Shared and Microsoft from C:\Program data(this is a hidden folder) Properties > Security > Edit > Add > Type Network Service > OK > Check the Full control box > Apply and OK.

In Registry Editor (regedit.exe): Go to HKEY_CLASSES_ROOT\AppID registry >Right Click on the folder > Permissions > Add > Type = NETWORK SERVICE > OK > Check Full Control > Apply > OK

I found this response here::: https://social.technet.microsoft.com/Forums/windows/en-US/5dda9b0b-636f-4f2f-8e50-ad05e98ab22d/error-1920-service-office-software-protection-platform-osppsvc-failed-to-start-verify-that-you?forum=officesetupdeployprevious

Which was originally a method discovered by Jennifer Zhan

0

I had this issue while testing software. Drivers were not signed.

Tip for me was: in cmd line: (administrator) bcdedit /set TESTSIGNING ON and reboot the machine (shutdown -r -t 5)