2

I am running McAfee VirusScan Enterprise 8.7i on my Windows 7 machine.

I am writing this utility to configure McAfee. Now how do I turn off McAfee programmatically (using C++ or C#)?

The only ways I can do it right now are:

  • Manually opening the McAfee Virusshield icon from the system tray and then selecting Exit.

  • Run a command prompt under SYSTEM account (using System internals tool psexec) and then issue the command "sc stop McShield"

Cœur
  • 37,241
  • 25
  • 195
  • 267
Santhosh
  • 6,547
  • 15
  • 56
  • 63
  • 2
    Why you don't execute the command "sc stop McShield" programmatically? – road242 Feb 23 '10 at 17:58
  • Buy their product to do mass-configurations: http://www.mcafee.com/us/enterprise/products/security_management_console/epolicy_orchestrator.html – thijs Feb 23 '10 at 18:02
  • 1
    Are you sure you're not writing a virus? – BoltBait Feb 23 '10 at 18:04
  • @hkda150 "sc stop McShield" will only work when the program that executes is running as SYSTEM account. Now the maximum elevation my program can get is "Administrator". – Santhosh Feb 23 '10 at 18:04
  • You can also force a reboot. Crude but effective ;) – thijs Feb 23 '10 at 18:06

2 Answers2

7

I guess the point of virus scanners is that they CANNOT be switched off by other software (at least not easily)

devio
  • 36,858
  • 7
  • 80
  • 143
  • Definitely. Antivirus software puts a lot of effort into preventing other programs from disabling it. – MightyE Feb 23 '10 at 18:00
  • @thijs It is not possible even when i am running as admin. I need to run under SYSTEM account(something which my program can't afford) to accomplish that. – Santhosh Feb 23 '10 at 18:05
  • After several trials, it really seems that it is not possible to turn off McAfee 8.7i programatically; – Santhosh Sep 09 '10 at 09:05
  • 2
    this antivirus is slow for java developers, because it searches inside jar files for threats, which decreases the whole computer performance...and THAT's not a valid answer for the question! – Panthro Sep 22 '11 at 22:10
1

Right click on the VShield icon in the system tray and choose Manage features and the VirusScan Enterprise Double click on Access Protection to get to the properties Un-check the option for "Prevent McAfee services from being stopped" You should now be able to stop the McAfee services