windows-services

New Windows Service installed, fails to start: “System error 2 … system cannot find the file specified”

╄→尐↘猪︶ㄣ 提交于 2019-12-03 01:03:01
I have installed several other custom .Net windows services successfully. A new one I had recently written was very similar to the others and while it installed without error - on starting it with the service controller it failed to start with the error dialog: System error 2 ... system cannot find the file specified. After time and consternation, the only thing I could think of that was significantly different about this service was that the path and executable name were at least 10 characters longer than any of my other services. On shortening both the path and .exe name and re-installing,

Install a service on Windows (Vista/XP/7) using Inno Setup

你离开我真会死。 提交于 2019-12-03 00:46:09
I need to install and run a service when install an application (installer.exe is created using Inno Setup) I used codes below [Run] Filename:"{sys}\myservice.exe "; Parameters: "-install" I am not sure if this is correct (I add codes to reminder reboot but I wonder if it is possible to run the service immediately after installation without reboot pc.) [Setup] AlwaysRestart=yes Welcome any comment. Use sc.exe, It is simple, the only drawback is you may have to intercept and parse output to know what went wrong, if it did. Use my Inno Setup service library . It's a Pascal Script wrapper over

Play 2.0 - starting as Windows service after server restart

♀尐吖头ヾ 提交于 2019-12-03 00:33:17
I have the Play! application running as a windows service. It is implemented according to this guidance. The problem is that the RUNNING_PID at the root folder of the application is not removed when the server is restarted and the application cannot start again. I have to remove this file and start the service again manually. Is there any option to solve it? biesior YAJSW In case of YAJSW I found this answer with better understanding. It's of course pretty similar to link you gave, anyway keep in mind that it's more often advised to use dist command instead of stage as it has got better

How to host 2 WCF services in 1 Windows Service?

给你一囗甜甜゛ 提交于 2019-12-03 00:20:21
I have a WCF application that has two Services that I am trying to host in a single Windows Service using net.tcp. I can run either of the services just fine, but as soon as I try to put them both in the Windows Service only the first one loads up. I have determined that the second services ctor is being called but the OnStart never fires. This tells me that WCF is finding something wrong with loading up that second service. Using net.tcp I know I need to turn on port sharing and start the port sharing service on the server. This all seems to be working properly. I have tried putting the

How to install a Windows service developed in .NET 3.5?

橙三吉。 提交于 2019-12-03 00:11:30
I have developed a Windows service using Visual Studio 2008. I want to install that service in a machine where Visual Studio is not installed, but .NET 3.5 is installed. Generally InstallUtil.exe shall be used for installing a Windows Service, but the InstallUtil.exe utility is not available in .NET 3.5. When I tried installing that service using .NET 2.0, the service is getting displayed in the list of services but when starting the service Windows Service error 1053 is coming. How we can avoid this problem and successfully install the service? There's a Microsoft KB on this for .Net 2.0 and

Windows Services Recovery not restarting service

寵の児 提交于 2019-12-03 00:06:35
I configure the recovery for Windows services to restart with a one minute delay after failures. But I have never gotten it to actually restart the service (even with the most blatant errors). I do get a message in the EventViewer: The description for Event ID ( 1 ) in Source ( MyApp.exe ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event:

Installing/Uninstalling Services in Windows 7: “Error 1001. The specified service has been marked for deletion”

时光毁灭记忆、已成空白 提交于 2019-12-02 23:46:45
I am currently developing a Windows Service in .NET 4.0, Visual Studio 2010, Windows 7-32bit. I have an installer project that does the installation for me. When I install the service, uninstall it, and try to install again, I get the following error: Error 1001. The specified service has been marked for deletion In Windows XP, the problem was that the Services.msc was open. Closing this window would fix this problem. However, with Windows 7, the only way I can fix this is to restart. I tried closing all my programs, but the problem still persists. Does anyone know how to fix this without

Path to the executable of a windows service

拜拜、爱过 提交于 2019-12-02 23:44:44
How can I get the path to the executable of a specific windows service from another program ? Unfortunately the class ServiceController (System.ServiceProcess) doesn't provide a method or property for that ! Hans Olsson There's always the WMI class Win32_Service as described here , specifically the PathName . This works: ManagementClass mc = new ManagementClass("Win32_Service"); foreach(ManagementObject mo in mc.GetInstances()) { if(mo.GetPropertyValue("Name").ToString() == "<Short name of your service>") { return mo.GetPropertyValue("PathName").ToString().Trim('"'); } } You can obtain them

What are the differences between a web service and a Windows service?

徘徊边缘 提交于 2019-12-02 21:42:27
What are the differences between a web service and a Windows service? My experience has mostly been with Windows services, and I have never created a web service. Do web services behave similarly to Windows services? Can they have scheduling, run at certain times, etc.? When you would use a web service in place of a Windows service, and vice versa? They're about as different as two things can be. A Windows service is an application that runs without a user being logged into the system, usually to process some data on the machine that needs no user intervention to work with. A Web service is a

Node js start and stop windows services

感情迁移 提交于 2019-12-02 21:02:30
I have a nodeJS app that communicates with a third party application installed as a windows service. My nodeJS application requires this service to be running, however if some circumstances it may not. Im trying to search for a method to check if this windows service is running and if not start it. After many days searching i have found many results for running a nodeJS application as a windows service but not one providing the ability to start/stop already installed windows services. Is this even possible? I have found tools like PSEXEC so I could make nodeJS run such a script but it would be