Can you delete a service?

Is it possible to delete a windows service with .NET.  If so an example would be great.  I've looked at ServiceProcess.ServiceInstaller.uninstall but have not figured out how to use yet.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

try something like this

InstallUtil /u yourservice.exe

the installutil is part of the .net framework and can be found in
c:\windows\\framework\v1.x.xxxx where x.xxxx is the version of the framework you use
I'm not exactly sure I understand... but if you're wanting to disable a service, that's pretty strait forward.    So, I'm guessing you're trying to make it "go away" from the list of services that the PC is aware of.

If so, then a simple method would be to just delete the registry key (starting at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services) that is responsible for listing that service.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

Also try RegSvcs from the .NET command prompt:
regsvcs /u AssemblyName

for help:
regsvcs /?
mwertzAuthor Commented:
Yes, that's correct, I'm trying to make it go away from the list of services.   I already tried to delete from \CurrenControlSet\Services but it is still listed.  
like I said before

InstallUtil /u yourservice.exe

this will remove it from the list
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.