programmatically removing a service

G

Guest

I would like to write a program that can remove a windows service and I do
not wish to use the windows installer. Can someone point me in the right
direction?
Thanks
 
W

Willy Denoyette [MVP]

J Childs said:
I would like to write a program that can remove a windows service and I do
not wish to use the windows installer. Can someone point me in the right
direction?
Thanks
This program exists it's called sc.exe (Service Controller) and included
with the system, just call it using Process.Start using the correct
argments.
run sc from the command line to get a list of options.

Willy.
 
D

David Browne

J Childs said:
I would like to write a program that can remove a windows service and I do
not wish to use the windows installer. Can someone point me in the right
direction?
Thanks

A service is nothing more than a bunch of registry entries. Look at:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\[whatever]

David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top