How to delete a Windows service without restarting

Last Modified: Fri, 24 Apr 2009 17:28:53 +0000 ; Created: Fri, 24 Apr 2009 17:28:53 +0000

Tested on Windows XP Pro or Server 2003 machines. Also works for Windows 2000, but you must copy the sc.exe command to the box from a Windows 2003 box.

This works best if you close the Services console (services.msc) first.

Do the following

  1. sc \\machine stop "service name"
  2. sc \\machine delete "service name"

Note that service name is the internal name of the service and not the descriptive one you see in the Services console. View the service properties to get the internal name.

Give it 15 seconds to fully remove the service. If the service just gives you the Marked for deletion message do the following:

  1. Run regedit
  2. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\ServiceName
  3. Change the DeleteFlag from 1 to 0