可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
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.
- Verified the Logon user is a member of Administrators.
- Verified the user account settings are exactly the same as another machine where it works.
- Verified from Control Panel - Administrative tools - Local Security Policy - Local Policies - Security Options = that these again match machine where it works.
- Ensured that all windows updates have been applied.
- Verified that the Windows Management Instrumentation Service is running. Restarted it.
- Rebooted the machine, then tried again.
- 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
回答1:
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.
回答2:
Make sure all services windows are closed before starting install/uninstall
回答3:
I also had the same issue. I fixed this by installing the .NET framework version 4.5.
回答4:
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.
回答5:
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.
回答6:
Check service dependencies if they are disabled.
Set those dependencies to Automatic, Start them and it should work.
回答7:
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.
I actually had to create two new components. One was of type "Install Service".
The other component I had to add was of "Control Service" type.
I had to choose the service that I had setup when I added the Install Service component.
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.
回答8:
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
回答9:
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)
回答10:
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