Windows Service - Deleted But Still Showing
Windows Service - Deleted But Still Showing
Author
Discussion

roadsweeper

Original Poster:

3,790 posts

305 months

Wednesday 22nd August 2007
quotequote all
Hi

I have a problem with services.msc in that it is still showing a service for which the program has been uninstalled. The Status and Startup Type columns are blank and attempting to bring up the properties of the service results in the following two errors:

"Configuration Manager: A required entry in the registry is missing or an attempt to write to the registry failed."

When I OK, I get the next message:

"The system cannot find the file specified."

Using "sc query" or msconfig doesn't actually show the service, so they appear to know it's gone, it's just the Services Console.

I have run RegVac and manually tried to find a problem in the registry without success. There is no further information in the event logs.

Any suggestions are very welcome! smile

Edited by roadsweeper on Wednesday 22 August 20:00

BaconBonce

579 posts

266 months

Wednesday 22nd August 2007
quotequote all
Can you see the service listed at the following location in Regedit?

HKEY_LOCAL_MACHINE > System > CurrentControlSet > Services

I've had rogue entries hanging behind before and deleting from here tends to clear them - just be careful/sure of what you delete smile

roadsweeper

Original Poster:

3,790 posts

305 months

Wednesday 22nd August 2007
quotequote all
Thanks for the suggestion. It's not showing there. confused

Edited by roadsweeper on Wednesday 22 August 20:00

fazz81

324 posts

266 months

Thursday 23rd August 2007
quotequote all
Have you re-booted?

Edited by fazz81 on Thursday 23 August 09:55

sp60

524 posts

290 months

Thursday 23rd August 2007
quotequote all
sc delete <service name>

n.b.
service name must be in quotes if it contains spaces.

Edited by sp60 on Thursday 23 August 11:26

roadsweeper

Original Poster:

3,790 posts

305 months

Thursday 23rd August 2007
quotequote all
sp60 said:
sc delete <service name>

n.b.
service name must be in quotes if it contains spaces.

Edited by sp60 on Thursday 23 August 11:26
Thanks. I've tried 'sc query' but it's not listed there so I can't delete it.

roadsweeper

Original Poster:

3,790 posts

305 months

Thursday 23rd August 2007
quotequote all
fazz81 said:
Have you re-booted?
Edited by fazz81 on Thursday 23 August 09:55
Actually, despite it being the cure for 90% of MS Windows ills, I haven't. The server in question is a 24x7 high avaliability piece of kit and I'd need to schedule downtime with 7 day's notice so I was hoping there might be a solution not involving attempting a reboot (and the potentially finding it hadn't worked anyway!). I'm starting to think a reboot is the next sensible port of call though.

FunkyGibbon

3,864 posts

295 months

Thursday 23rd August 2007
quotequote all
try regclean http://www.regclean.com/?hop=regtool to find the errant HKEY entries

As it is a high availability server I wouldn't recommend you get regclean to clean everything it may find, but it may well find the bit you are after and allow you to clean that bit manually.

sp60

524 posts

290 months

Thursday 23rd August 2007
quotequote all
roadsweeper said:
sp60 said:
sc delete <service name>

n.b.
service name must be in quotes if it contains spaces.

Edited by sp60 on Thursday 23 August 11:26
Thanks. I've tried 'sc query' but it's not listed there so I can't delete it.
Have you tried it anyway?!
I've had situations exactly the same as yours where there is a service in the list that no longer exists. This has always worked for me.
Failing that I have a theory! This situation normally occurs when an application is removed whilst the services window is still open. Presumeably the service list is cached somewhere, but the cache cannot be refreshed whilst the window is open, so it is flagged for refresh on next reboot. You could try adding a different program that installs a service, then remove that program straight away. As long as the services window is closed, this may or may not cause a background refresh of the services cache and remove the stray entry.
May be worth a try!

fazz81

324 posts

266 months

Thursday 23rd August 2007
quotequote all
roadsweeper said:
fazz81 said:
Have you re-booted?
Edited by fazz81 on Thursday 23 August 09:55
Actually, despite it being the cure for 90% of MS Windows ills, I haven't. The server in question is a 24x7 high avaliability piece of kit and I'd need to schedule downtime with 7 day's notice so I was hoping there might be a solution not involving attempting a reboot (and the potentially finding it hadn't worked anyway!). I'm starting to think a reboot is the next sensible port of call though.
I have seen this before when removing services, but have always been lucky enough to be not working on a high availability server.

Might be worth trying this and see if it shows up.
If your lucky, running this might cause a refresh of the service manager and it will disappear from the MMC.

http://www.microsoft.com/downloads/details.aspx?familyid=A78BC3C5-181F-4A12-8656-A2766AA03901&displaylang=en 

Or you could kill of the explorer process, which should cause windows to reload the registry. not sure thats such a good idea though.....

Edited by fazz81 on Thursday 23 August 14:16

bholleran

361 posts

244 months

Thursday 23rd August 2007
quotequote all
I have developed lots of services in the past and I found that this happens in the following situations.

If you have a service installed and you are in the service manager. If you have the service you want to delete highlighted and then using any method delete the service. It does not delete it, instead it marks it for deletion on next reboot. (So i think the advise given earlier to reboot will fix the problem).

For future reference, make sure that all instances of the service manager are closed before you try to delete a service, I have found in most cases it will then allow you to delete them without a reboot.

I hope this helps.

jimothy

5,151 posts

268 months

Thursday 23rd August 2007
quotequote all
bholleran said:
I have developed lots of services in the past and I found that this happens in the following situations.

If you have a service installed and you are in the service manager. If you have the service you want to delete highlighted and then using any method delete the service. It does not delete it, instead it marks it for deletion on next reboot. (So i think the advise given earlier to reboot will fix the problem).

For future reference, make sure that all instances of the service manager are closed before you try to delete a service, I have found in most cases it will then allow you to delete them without a reboot.

I hope this helps.
Wot he said!