Questions tagged [windows-service]

Windows services, also referred to as NT services, are background service processes run by the Service Control Manager based on the service settings and optionally restarted as needed. Windows services are also capable of being launched on demand, based on other service dependencies.

More information at:

http://msdn.microsoft.com/en-us/library/d56de412(v=vs.80).aspx

http://en.wikipedia.org/wiki/Windows_service

430 questions
168
votes
5 answers

How to add dependency on a Windows Service AFTER the service is installed

I have a Windows Service that makes use of a SQL Server database. I don't have control over the installation of the service, but would like to add a dependency on the service to ensure that it starts after SQL server has started. (SQL server is…
Rick
  • 1,825
  • 2
  • 13
  • 6
69
votes
9 answers

How can I automatically restart a Windows service if it crashes?

I have a Windows service that exits unexpectedly every few days. Is there a simple way to monitor it to make sure it gets restarted quickly if it crashes?
Liam
  • 1,401
  • 3
  • 19
  • 28
65
votes
5 answers

How do I grant start/stop/restart permissions on a service to an arbitrary user or group on a non-domain-member server?

We have a suite of Windows Services running on our servers which perform a bunch of automated tasks independently of one another, with the exception of one service which looks after the other services. In the event that one of the services should…
abitgone
  • 1,323
  • 1
  • 11
  • 14
42
votes
8 answers

How do I restart a Windows service from a script?

I have a batch script that looks like: sc stop myservice sc start myservice it errors out because sc doesn't wait till the service is stopped. How do I restart a service with a script?
Joshua
  • 779
  • 1
  • 9
  • 19
39
votes
3 answers

How do I increase windows service startup timeout

I have migrated software to a very slow sever. Some software services refuses to startup because of system timeout. How do I increase timeout from default 30 sec.(?) to several minutes? Thank you in advance!
user149691
  • 531
  • 1
  • 4
  • 6
34
votes
6 answers

How do I track CPU Utilization for Window Services?

I am using the windows task manager to track CPU utilization. I notice that my applications are listed but Windows Services are not. For instance, total CPU usage is listed at 70% but the summary of the listed applications is only about 30%. I…
John
29
votes
6 answers

How do I configure proxy settings for LOCAL SYSTEM?

If I edit Proxy Settings through the Control Panel, the settings are stored in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable and ...\ProxyServer. These settings are of course not used when running as a…
27
votes
5 answers

What is svchost and why are multiple instances of it running?

There's six instances running on my desktop, and probably ten on a server I manage. What is this, and is it vital to system function?
jldugger
  • 14,342
  • 20
  • 77
  • 129
26
votes
3 answers

How can I programmatically cause a new Windows user's profile to be created?

I'm creating a (local) user for a Windows service to run as. I've got good reasons for not wanting to use NETWORK SERVICE, LOCAL SERVICE, or LOCAL SYSTEM. I create the user via net user foobar "Abcd123!" /add - this works fine. At this point,…
Peter Mounce
  • 1,253
  • 5
  • 16
  • 29
24
votes
10 answers

How to create a service running a .bat file on Windows 2008 Server?

I've created the service using sc create myService binpath=myservice.bat But when I start it, it fails with the following error message: [SC] StartService FAILED 1053: The service did not respond to the start or control request in a timely…
abyx
  • 403
  • 1
  • 4
  • 11
22
votes
4 answers

Set service StartType to Automatic - Delayed

Using Set-Service, I'm able to change the StartType of my services between the accepted values of Boot, System, Automatic, Manual, Disabled. Using services.msc, I'm able to set some services to startup with a Priority of Automatic (Delayed Start).…
Peter Vandivier
  • 393
  • 1
  • 2
  • 12
22
votes
1 answer

Windows service trigger start - difference manual vs automatic?

Since Windows Server 2008 R2 (and Windows 7 I think for the client OS) Microsoft has introduced trigger start for services. I do understand difference between automatic, automatic (delayed) and manual startup types. From what I read on googled…
R1cky
  • 363
  • 1
  • 2
  • 10
20
votes
6 answers

How to start a service with certain start parameters on Windows

How do I start a service with certain parameters? In another question I have found net start servicename blah but if I try this, net throws a syntax error at me. What am I doing wrong? Edit: To clarify net start servicename works just fine, but…
sbi
  • 463
  • 2
  • 4
  • 12
19
votes
6 answers

How can I get the path to a Windows service executable WITHOUT using sc qc?

I need to query a windows service for the path to it's executable via the command prompt. I think the way I would do this is:sc qc myServiceName, but when I do that, I get the following error: [SC] QueryServiceConfig FAILED 122: The data area…
Jared
  • 519
  • 1
  • 4
  • 11
16
votes
1 answer

In a Windows Service, will the Start Parameters be preserved if the Start is of type "Automatic"?

Well the title says it, in a Windows Service, will the Start Parameters be preserved after a reboot if the Start is of type "Automatic"? Many Thanks
1
2 3
28 29