Questions tagged [windows-services]

Windows services are background service processes run by the Service Control Manager on Windows NT based operating systems, similar to daemons or UNIX services.

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.

See also Introduction to Windows Service Applications

8565 questions
647
votes
21 answers

How to solve "The specified service has been marked for deletion" error

I try to remove a Windows Service with sc delete , and encounter the following error: [SC] DeleteService FAILED 1072: The specified service has been marked for deletion. What I've already done: Stopped the service, obviously. The sc…
Arseni Mourzenko
  • 45,791
  • 28
  • 101
  • 185
589
votes
14 answers

How do I uninstall a Windows service if the files do not exist anymore?

How do I uninstall a .NET Windows Service, if the service files does not exists anymore? I installed a .NET Windows Service using InstallUtil. I have since deleted the files but forgot to run InstallUtil /u first. So the service is still listed in…
Thomas Jespersen
  • 11,101
  • 12
  • 43
  • 54
449
votes
13 answers

How can I delete a service in Windows?

I have a couple old services that I want to completely uninstall. How can I do this?
sgwill
  • 8,694
  • 7
  • 31
  • 40
389
votes
10 answers

Create Windows service from executable

Is there any quick way to, given an executable file, create a Windows service that, when started, launches it?
German Latorre
  • 8,457
  • 11
  • 39
  • 59
369
votes
1 answer

"Automatic" vs "Automatic (Delayed start)"

When installing Windows services there are two options for automatically starting a Windows service on Windows startup. One is Automatic, and the other is Automatic (Delayed start). What is the difference between these two in detail? For example, if…
Sachin Kainth
  • 41,237
  • 78
  • 185
  • 289
346
votes
19 answers

Install a Windows service using a Windows command prompt?

I want to install a Windows service using a Windows command prompt (not the Visual Studio command prompt). How do I do this?
Vikash Pandey
  • 3,529
  • 2
  • 14
  • 8
338
votes
28 answers

Easier way to debug a Windows service

Is there an easier way to step through the code than to start the service through the Windows Service Control Manager and then attaching the debugger to the thread? It's kind of cumbersome and I'm wondering if there is a more straightforward…
Mats
  • 13,840
  • 29
  • 73
  • 106
291
votes
17 answers

Retrieving the COM class factory for component with CLSID {XXXX} failed due to the following error: 80040154

I developed a Windows service using C#.NET to generate PDF report. To generate PDF file I am using a third party dll. The application is running in my Windows XP platform. When I deployed the service in Windows Server 2008 64 bit version, I got this…
gopal
  • 3,501
  • 5
  • 22
  • 25
263
votes
8 answers

Modifying the "Path to executable" of a windows service

I'd like to modify the path to my application, but doing so breaks it because the service still points to the old location. By going to Administrative Tools > Services you can open a properties dialog and view the Path to executable, but there is…
GenericJon
  • 7,767
  • 4
  • 35
  • 49
235
votes
22 answers

The type initializer for 'MyClass' threw an exception

The following is my Windows service code. When I am debugging the code, I am getting the error/ exception: The type initializer for 'CSMessageUtility.CSDetails' threw an exception. using System; using System.Collections.Generic; using…
gofor.net
  • 3,850
  • 10
  • 37
  • 64
225
votes
19 answers

How to create a windows service from java app

I've just inherited a java application that needs to be installed as a service on XP and vista. It's been about 8 years since I've used windows in any form and I've never had to create a service, let alone from something like a java app (I've got a…
ideasculptor
  • 1,056
  • 3
  • 12
  • 19
224
votes
12 answers

Map a network drive to be used by a service

Suppose some Windows service uses code that wants mapped network drives and no UNC paths. How can I make the drive mapping available to the service's session when the service is started? Logging in as the service user and creating a persistent…
VoidPointer
  • 16,811
  • 14
  • 51
  • 58
216
votes
29 answers

How can I run MongoDB as a Windows service?

How can I set up MongoDB so it can run as a Windows service?
heisthedon
  • 3,552
  • 3
  • 19
  • 23
208
votes
4 answers

What are the specific differences between .msi and setup.exe file?

I searched a lot, but all are guessed answers. Help me to find the exact answer.
Babu
  • 2,239
  • 3
  • 18
  • 13
188
votes
2 answers

How can I verify if a Windows Service is running

I have an application in C# (2.0 running on XP embedded) that is communicating with a 'watchdog' that is implemented as a Windows Service. When the device boots, this service typically takes some time to start. I'd like to check, from my code, if…
edosoft
  • 16,270
  • 24
  • 75
  • 108
1
2 3
99 100