Found an interesting DOS command today thanks to Will off of Superuser.com.
The following command can be used to delete a dead Windows service from the services Microsoft Management Console (MMC). A dead service may occur when after uninstalling a piece of Software whose service had been disabled and not re-enabled prior to the orighinal removal process.
Be warned though, you have to KNOW that the service is dead before you attempt to delete it. If, upon attempting to set a service to run automatically and attempting to start it in the 'Services' MMC, you receive messages such as 'cannot find the associated EXE', it is almost a sure fire indicator that a service is dead...whether this is a good thing or not in terms of your system is for you to decide.
What can be taken for granted is that at this point the service itself is not likely to be having any effect on anything within your operating system. If in doubt, use the Services MMC to find out where the EXE should be storred (usually C:\Program Files\[Folder Named After Associated Software] or similar). Simply right click the service and look in the general tab. Navigate through to this location and make double sure that the particular file or folder no longer exists.
To delete a DEAD service:
- Logon to the terminal with the offending service as administrator
- Unless you have a shortcut, open a CMD window from the following location:
Start --> Run - Type:
SC query state= all >> "C:\[preferred folder name]\Services_list.log" - Hit the Return/Enter key (not too hard!)
- Open the log file created by the above CMD statement (which should be saved to the location stated after the double chevrons (the ">>" bit))
- Browse through the file created to find the name of the System name of the service you want to remove. Remember, take time to be ABSOLUTELY SURE it is a service which you definately wish to get rid of and that it is one that can be gotten rid of without destroying the backbone of your operating system.
- Note it down or highlight and copy it from the 'Services_list.LOG'
- Click back to the CMD window.
- Type the following command:
SC Delete [Service Name] - Hit Return/Enter again.
This should result in a message appearing on the screen detailing that the offending service has been removed from your system for good. This method negates the potentially operating system trashing need to trawl through your registry to find the offending entries.
The 'SC' command in DOS appears to be a rather usefull tool with many different uses. Simply open a CMD window and type:
SC /?
...to reveal its further uses. This can be done for most every DOS command should you be at a loss on how to utilise it.
Hope this helps someone. Feel free to drop me a line if it does!!
No comments:
Post a Comment