Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

2 Answers 2

up vote 3 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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.