How to delete registry folder in HKLM\SYSTEM\CurrentControlSet\Services\?

0

win 2003 I get error when trying to delete even if I running regedit as SYSTEM.

Service that I want to delete refers to another, not system, software. This software was deleted long ago, but service still there. When service tries to start, it can't cause of missing .exe. I was already tried 'sc delete' and it works until first reboot, than that service appears again. Of course 'sc query' condition is stopped.

lfreedoml

Posted 2017-09-07T08:57:38.323

Reputation: 1

You cannot remove a key that is in use. Given that the services registry key is being used by more than one services, it would be weird to delete that entire folder. Why would you even want to delete it? – LPChip – 2017-09-07T09:04:48.173

See updated question – lfreedoml – 2017-09-07T10:27:23.273

You may have better luck installing the software again, and then delete it again. – LPChip – 2017-09-07T10:50:08.683

@LPChip unfortunately it's impossible – lfreedoml – 2017-09-07T11:19:06.260

Answers

0

lfreedoml

Posted 2017-09-07T08:57:38.323

Reputation: 1

0

The sub-keys HKLM\SYSTEM\<ControlSet>\Services are, as the path implies, used to store data about Windows services. The key is controlled and locked by the Service Control Manager (SCM), which is a system-level process that starts up when Windows does, before you can even log in.

You can control the SCM in a few ways, and it has functions to delete Windows services. From the command line, the command you want is sc.exe delete <reg_key_name> (must be run as Administrator). You can get help info from the sc command itself; it's pretty self-documenting. For example:

> sc.exe delete
DESCRIPTION:
        Deletes a service entry from the registry.
        If the service is running, or another process has an
        open handle to the service, the service is simply marked
        for deletion.
USAGE:
        sc <server> delete [service name]

This assumes the service isn't running, at present. You can get the service's current status using the sc.exe query <NAME> command, and then stop the service using stop instead of query or delete.

This does, of course, delete the corresponding Windows services (from places like the Services management console, services.msc, among other things). Bear in mind that services often provide useful or even essential functionality to the system or to software that you have installed; don't go deleting them without a good reason and make sure you know what you're doing.

CBHacking

Posted 2017-09-07T08:57:38.323

Reputation: 5 045