windows-services

Starting a windows service fails with error 1053

本秂侑毒 提交于 2019-12-28 17:31:45
问题 I have a windows service that is failing to start, giving an error "Error 1053: The service did not respond to the start or control request in a timely fashion". Running the service in my debugger works fine, and if I double click on the the service .exe on the remote machine a console window pops up and continues to run without problem - I can even see log messages showing me that the program is processing everything the way it should be. The service had been running fine previously, though

Using SC.exe to set service credentials password fails

巧了我就是萌 提交于 2019-12-28 17:26:10
问题 I know this question has been asked in the past, but a satisfactory answer has not been provided. I am using the SC command to config the credentials for a service. SC.exe config "SERVICE NAME" obj= "domain\user" password= "password" This completes successfully, but when I start the service, it fails to perform the login. [ NET START "service name" ] If I manually update ONLY the password from the services.msc , then when I start the service it works fine. I have hundreds of servers to update

Using SC.exe to set service credentials password fails

◇◆丶佛笑我妖孽 提交于 2019-12-28 17:26:06
问题 I know this question has been asked in the past, but a satisfactory answer has not been provided. I am using the SC command to config the credentials for a service. SC.exe config "SERVICE NAME" obj= "domain\user" password= "password" This completes successfully, but when I start the service, it fails to perform the login. [ NET START "service name" ] If I manually update ONLY the password from the services.msc , then when I start the service it works fine. I have hundreds of servers to update

Is it possible for a Windows service impersonate a user without a password?

不羁的心 提交于 2019-12-28 12:07:36
问题 Is it possible for a C# Windows service running as Local System or Local Service to impersonate another user without needing a password for that user ? How would this be done? Note: My motivation for this is to be able to run user specific WMI queries in a service. The WMI calls I'm making (to the OfflineFiles WMI API) are user sensitive, and they only work when I run my service as the user whose data I want to query. I don't want users to have to enter their usernames and passwords when

Error 1001 when installing custom Windows Service

浪子不回头ぞ 提交于 2019-12-28 11:56:14
问题 I wrote a windows service that runs on Framework 4.0 and running in VS 2015. I also created a setup project (free Installshield version). My service did not show under services.msc after I installed it, so according to some other posts I had to mark the Primary Output in InstallShield as 'Installer Class', but when I do that I get Error 1001 when I run the setup.exe. This post states that "Error code 1001 ALWAYS means a failure in the Installer class custom action." and that I should not use

Error 1001 when installing custom Windows Service

孤人 提交于 2019-12-28 11:56:04
问题 I wrote a windows service that runs on Framework 4.0 and running in VS 2015. I also created a setup project (free Installshield version). My service did not show under services.msc after I installed it, so according to some other posts I had to mark the Primary Output in InstallShield as 'Installer Class', but when I do that I get Error 1001 when I run the setup.exe. This post states that "Error code 1001 ALWAYS means a failure in the Installer class custom action." and that I should not use

Show a message box from a Windows Service

Deadly 提交于 2019-12-28 05:59:28
问题 Can you display a message box (or any form of notification) from a windows service? Can't get it to work. I used: global::System.Windows.Forms.MessageBox.Show("A fatal error occurred. " + ServiceName + " is now terminating."); but it didn't work and just produced an error. 回答1: No, you cannot show a message box from a service. If you want to report errors, the standard way to do this is with the event log. For more "advanced" kinds of UI (not just error reporting), the way this is typically

Error 1053: the service did not respond to the start or control request in a timely fashion

最后都变了- 提交于 2019-12-28 02:26:06
问题 I have recently inherited a couple of applications that run as windows services, and I am having problems providing a gui (accessible from a context menu in system tray) with both of them. The reason why we need a gui for a windows service is in order to be able to re-configure the behaviour of the windows service(s) without resorting to stopping/re-starting. My code works fine in debug mode, and I get the context menu come up, and everything behaves correctly etc. When I install the service

How to install node.js as windows service?

筅森魡賤 提交于 2019-12-27 11:33:50
问题 I have downloaded node.js executable. How can I run that executable as windows service? I cannot use standard node.js installer, since I need to run multiple version of node.js concurrently. 回答1: Late to the party, but node-windows will do the trick too. It also has system logging built in. There is an API to create scripts from code, i.e. var Service = require('node-windows').Service; // Create a new service object var svc = new Service({ name:'Hello World', description: 'The nodejs.org

Service hangs up at WaitForExit after calling batch file

橙三吉。 提交于 2019-12-27 10:47:47
问题 I have a service that sometimes calls a batch file. The batch file takes 5-10 seconds to execute: System.Diagnostics.Process proc = new System.Diagnostics.Process(); // Declare New Process proc.StartInfo.FileName = fileName; proc.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; proc.StartInfo.CreateNoWindow = true; proc.Start(); proc.WaitForExit(); The file does exist and the code works when I run the same code in-console. However when it runs inside the service, it hangs