PDA

View Full Version : Batch file to update McAfee


jjbova
08-15-2007, 04:33 PM
OK, I wasn't sure where to put this, but since it's VERY simple. I thought maybe I could get help....

As a back ground about me, I don't know programming. I know computers, I know hard ware, and I know alot of software... but programming is not my specialty. Either way, I am a System Admin, or a large company. My main section is the Antivirus for all the clients, and for the servers. As we get more and more workstations on the network (we are at a little over 5500 right now), more and more are needing manual updating. I am using PSTOOLS to push out my updates, however it is starting to take up alot of my time.

I have been trying to get a batch written that I can just run and it will push the update out to the 50+ computers that don't get the update. The problem I hit was.... is there a way in a batch file to just paste in my list of IP's and have the batch run the update on one, and then move to the next, and then the next..... until it's done.

This is all I have right now, and it works perfect if I put the ip where it says ~ip~.... but I am looking for a way to just paste in a list of IP's... any Ideas.


echo off
psexec \\~ip~ "C:\Program Files\Network Associates\VirusScan\mcupdate"


echo Finished
pause
exit

oracleguy
08-15-2007, 05:28 PM
Are you using the enterprise version of McAfee?

But as to your original question a batch file might not cut it here, you might need to write a vbscript file to do it. Then you could have a file with all your IPs in it, it could read it and execute that command for each one.

However I know the enterprise version of the McAfee software has support for scheduling automatic updates, you might just want to do that.

jjbova
08-15-2007, 06:37 PM
Not a bad idea Oracle. I am running Enterprise 8.0i. I also have ePO to push it out. And every day at about 6PM (after the network has slowed), the ePO pushes out the updates. There are always a group or so that don't get them, and I let them go until the next day and they update. But after about a week, there is usually around 25-50 workstations that just won't update, and get 5-6 definitions out of date. I know the guy I replaced had a batch that he had mapped to an INI file, and just pasted the IP's in an INI file. I just don't know how.

I will look into the vbscript idea. Thanks for the help.

oracleguy
08-15-2007, 06:49 PM
Well to give you more of a starting point then, you'll need to look up using the FileSystemObject with vbscript, that is how you can read and write files.

And then look up how to do a shell execute in vbscript so you can execute your command for each IP.