Link to home
Start Free TrialLog in
Avatar of mwertz
mwertz

asked on

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.
Avatar of RonaldBiemans
RonaldBiemans

try something like this

InstallUtil /u yourservice.exe

the installutil is part of the .net framework and can be found in
c:\windows\microsoft.net\framework\v1.x.xxxx where x.xxxx is the version of the framework you use
ASKER CERTIFIED SOLUTION
Avatar of graye
graye
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Also try RegSvcs from the .NET command prompt:
regsvcs /u AssemblyName

for help:
regsvcs /?
Avatar of mwertz

ASKER

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