Service applications implement the Windows Services API — a set of operations used to control and monitor services. They are not Service Applications. There is simply no way for Windows to directly control or interrogate any of those desktop programs as a service.
The company produces Dropbox. But when you try to start the Dropbox Service from the Services application, a curious scenario plays out:. Here you can see Dropbox and its two helper processes running in Process Explorer :.
Even though Windows kicked off Dropbox. A clear failure. And the story is the same with other regular, non-service applications as well. They all misfire in the same way. Viewed k times. Improve this question.
You can run a batch file as a service? Wouldn't a scheduled task be better? I know if you use an actual Windows Service, the OnLoad event needs to return within a few seconds. Add a comment. Active Oldest Votes. Improve this answer. Which is what I wrote I did. It just filtered right through my brain.
Either way, srvany seems like the best thing to do in this situation. Matthew Blackford Matthew Blackford 2 2 silver badges 6 6 bronze badges. I hadn't heard of this before, but it appears to be a valuable tool. Thanks for the tip. Thank you it worked for me. Though I am still looking for options to stop the service at a specified time. Can you provide some code? Korayem Korayem 2 2 silver badges 5 5 bronze badges.
Evan Anderson Evan Anderson k 18 18 gold badges silver badges bronze badges. Whisk Whisk 1, 1 1 gold badge 16 16 silver badges 21 21 bronze badges. And that should do it. I forget why. It seems fragile. Haven't dug into this yet but this thread experienced the same thing and solved it using nssm to install the service. Windows appears to not run. In my case the files the batch file is supposed to create are not created and the programs are not running, so I have to assume it's not starting it.
I managed to work around it by creating the service to run cmd. Note that I'm using Windows 10, so this may be some new "security" thing. Get " Error The service did not respond to the start or control request in a timely fashion. If running from powershell, use the full filename sc. As the error will tell you, sc is an alias for Set-Content. Show 7 more comments.
Zediiiii Zediiiii 7 7 silver badges 20 20 bronze badges. Goofyseeker Goofyseeker 71 1 1 silver badge 2 2 bronze badges. JeremyJStarcher I think this is actually the best answer on here. It just isn't explained all that well. Finally did it with nssm. Nicholas Nicholas Install NSSM and run the. Works as expected. Basically you create an XML file and then install it. Sign up or log in Sign up using Google.
Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. United States English. Ask a question. Quick access. Search related threads. Remove From My Forums. Answered by:. Archived Forums. Windows Server General Forum. Sign in to vote.
0コメント