McAfee - How to Close Vshwin32.exe
Keywords: McAfee Vshwin32.exe
Question:
I am writing a WinBatch script to automate the updating of McAfee VirusScan dat files. This involves
copying the latest dat files to c:\Program Files\Network Associates\McAfee VirusScan folder. Whenever
I do this, I get an access denied message (sharing violation) because the vshwin32.exe program has to be
terminated (it uses the scan.dat file). Manually this can be done by right clicking on the VShield icon on
the task bar and the clicking "exit".
I have been unable to successfully terminate the vshwin32.exe program using a WinBatch script. When I
try the WinClose("vshwin32.exe"), it can not find the program.
Answer:
Try this:
Winclose("VShieldWin_Class")
Winclose("NAI_VS_STAT")
These are the names of the two hidden windows that Vshield32 opens on the 4.0.x version of VirusScan.
You might be able to get away with just the first line, but I use both just in case. Watch out though, if the
user has his internet or download scans enabled, Webscanx will be running, and I haven't been able to
find a way to shut that one down.
A user reported the following:
This is a bug that has been present in McAfee since the 4.x series came out. No matter how you shut
down the McAfee VirusScan - it still locks that scan.dat file. Even if you bring up a utility like WPS - you
will see there are no components from McAfee running, but the file is still locked. They are looking for the
bug to fix it (still)... McAfee told me it was fixed in 4.02 - wrong. FYI - It has to do with a incompatibility
with the Dr. Solomon engine and McAfee's engine which were merged together and the offspring was 4.x.
I already have my own solution to this, and did some extensive research on this - so I can save you the
time and hassle.
- My solution was to copy the DAT files into the directory as *.new and then create a Wininit.ini with
Winbatch, so that on reboot - the *.new gets renamed to *.dat. There are 2 problems with this - 1 is that
the user doesn't get the new DATS until reboot. 2 - is that wininit likes short 8.3 filenames. If the users
Network Associates directory is Networ~2 or Networ~3 - you need to take that into account. I could
use WinBatch to figure it out - but its just as easy to include ~1 and ~2 and ~3 in the batch files - only one
will work anyway.
- McAfee has come out with an EXE that contains DATS in it, and shuts down McAfee properly,
copies the DATS, and restarts it without reboot. This works great - wrapped with WinBatch - except that
the DATS are only release versions that come out every month or so. If you want to keep up with the
daily or weekly - sorry - no can do.
- Use the McAfee built in scheduler. Probably works OK - I don't trust anyone else to do the leg work
for me, I have been bitten too many times by products such as NAL, WinInstall, and the like. That's why I
use WInBatch. If its running its because I told it too - and if its not - I can change the code to fix it... FYI
- Notice McAfee came out with service pack 2 for 4.02. (I think) 4 of the 6 fixes were for the scheduler
piece.
NB:
There have been some modifications since the above was discussed. McAfee DOES not post their
"automatic EXE" for DAT file updates on a weekly basis, but I still choose to use Wininit.ini for 95/98 and
Delayed filecopy for NT. Good luck. You will NOT be able to shut down all of McAfee with any sort of
WinBatch WinClose command. Not WinBatches fault, it's McAfee.
Article ID: W13116
Filename: Winclose Failure with McAfee Virus.txt
File Created: 1999:05:27:16:43:34
Last Updated: 1999:05:27:16:43:34