Tuesday, May 13, 2008

Service Control (sc.exe)

Today I had to remove a Windows service I'm writing from my Vista pc. I hoped that uninstalling it would be enough, bit no, the service was still there showing up in services.msc console.

So googling around I found that this can be easily done using a little known (or so I think) utility named sc.exe (sc is for Service Control, resides on System32 folder).

It has many flags and functions, but to go straight to my needs, to remove a service simply type at a command prompt (run it with "elevation", i.e. "as Administrator"):

sc.exe delete NameOfTheService

That's all. But try to run sc.exe with no parameters to have an idea of the many functionalities of the utility.

bye!

Discarded Stop

No comments: