Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Somehow, a windows service installed on a remote machine that we rely on has been marked for deletion. We don't know how or why it has been marked for deletion. Is there a way to unmark it for deletion?

share|improve this question
up vote 4 down vote accepted

The service is still running, but has been marked to be deleted upon next boot.

Open the machine's Registry (using Remote Registry if needed), find the service's subkey under HKLM\System\CurrentControlSet\Services, and delete the value named DeleteFlag.

The service will still appear as disabled, and operations on it will fail, but this should be fixed by a reboot. (But to be safe, export the service's subkey from registry, so you could reimport it afterwards.)

share|improve this answer
I don't see a delete flag, but I think it was there at one time. Here's what happened: This service exists on two machines. On machine A (where it's marked for deletion), I deleted the subkey entirely (before I did that, I do believe I saw DeleteFlag). I then went to machine B, exported the service info to a reg file, and imported it into machine A's registry. Did I just blow my chances at unmarking this for deletion? – oscilatingcretin Sep 16 '11 at 18:45
@oscilatingcretin: As long as DeleteFlag does not exist, the service should be okay. – grawity Sep 16 '11 at 18:46
Well, it's still telling us that the service has been marked for deletion every time we attempt to make a call to it, so something's borked up somewhere =\ – oscilatingcretin Sep 16 '11 at 18:49
@oscil - as grawity pointed out the service is not running, your problems won't be fixed, until a restart. – Ramhound Sep 16 '11 at 19:02
The deletion flag is kept in the service manager's memory too, that's why it fails. But the in-memory flag will go away after a reboot. The service won't get actually deleted if you removed the registry flag. – grawity Sep 16 '11 at 19:06

No, it has been emptied so the service information is gone. Restore a back-up...

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .