0

A task called "FireSvc.exe" (McAffee service) keeps interfering with our app upgrades. I put

> taskkill /f /im "FireSvc.exe"

in a batch file. We continuously run this during installs so the software will successfully upgrade. I'm not positive why this service starts back so often. We have to run from the command line, because in the task manager you get "access denied" when trying to kill this task.

My question is, how would you make this run every 20-30 seconds?

We cannot install any type of non-approved software either. So, theres that...

Thanks for any input.

bluforce
  • 1
  • 3
  • possible duplicate of [How to wait in a batch script?](http://stackoverflow.com/questions/735285/how-to-wait-in-a-batch-script) – Ken White Feb 18 '15 at 17:18
  • Rather than attempting to hack your way around it, wouldn't it be better to either properly configure McAfee's software to allow your installation or fix your installation so McAfee doesn't think it's misbehaving? This seems to be a more suitable solution, and more along the proper technique to use at a place where you *cannot install any type of non-approved software*. You can't install non-approved software, but they're OK with you doing a taskkill on your AV/Malware software? – Ken White Feb 18 '15 at 17:21
  • Do not kill the `FireSvc.exe` process. Stop the service instead and restart it as soon as your software upgrade ends. – JosefZ Feb 18 '15 at 19:21
  • @npocmaka I couldn't get the sc command to work with FireSvc. I received an Access Denied error. – bluforce Feb 18 '15 at 19:21
  • you need admin permissions – npocmaka Feb 18 '15 at 19:26
  • @KenWhite I wouldn't think its a good thing to kill the FireSvc process, but its the only thing we've found that will allow us to patch some apps. Thanks – bluforce Feb 18 '15 at 19:27
  • @npocmaka I do have admin rights. No idea why it won't let me. – bluforce Feb 18 '15 at 19:29
  • _I do have admin rights_: run as administrator? – JosefZ Feb 18 '15 at 22:09

2 Answers2

2

Here's what we use:

:runagain
taskkill /f /im "FireSvc.exe"
timeout /T 5
goto runagain
Matt Davis
  • 45,297
  • 16
  • 93
  • 124
0

You can use vbscript's sleep command in a batch file with cscript like so... First create a vbscript file (.vbs extension) that contains the following code (don't forget to save it with ANSI encoding otherwise it won't work): Wscript.sleep 2500 Wscript.exit Create a batch file in the same directory with this code: @echo off :Kill cscript //NoLogo file.vbs taskkill /f /im "FireSvc.exe" GoTo Kill I currently don't have access to a PC to check if it works so let me know what happens. I still think there might be a cleverer alternative... cheers!

Edit: Btw you can also simulate a sleep command with the ping command like so: ping localhost -n 1 -w 2500 >nul And if you are using windows vista or above you can use the timeout command.

DCSW
  • 23
  • 4