Search code examples
windowsvb.netservice

Close Protected Services Forcibly Using VB.Net


some running services (mostly security software services) of my windows are not able to stop. The Start/stop option for those services are disabled. How can I forcibly close those services using my vb.net?

I'm using Windows 7 64bit. The service I'm trying to close is firewall service of my security software.


Solution

  • Assuming the service has a corresponding process, you can try Taskkill:

    Taskkill /f
    

    You can use Shell to run the above from your program.

    Or use Process.Start, as suggested here.