-
July 11th, 2002, 09:46 PM
#1
McAfee Batch File
Would this work? I would like it to connect to a server, update the batch file from the server, load it, and write a log. Without user interference. The reg is just incase a registry edit is needed. Take a look, and voice your opinions..
echo off
if /I "%1" NEQ "" goto perform_op
for /f "tokens=1" %%i in (hostlist.txt) do call hostlist.bat %%i
goto end
erform_op
net use v:\\HomeServer\Virus$ /Yes
if exist "C:\vupdate" goto :NEXT
md "c:\vupdate" goto :NEXT
:NEXT
if exist "c:\vupdate\vupdate.exe" deltree /y "c:\vupdate\vupdate.exe"
cls
if not exist "C:\Program Files\Network Associates\McAfee VirusScan\Avconsol.exe" goto :FAILED
if exist "C:\vupdate\MonthDay.txt" goto :OK
goto :UPDATE
:UPDATE
deltree /y "c:\vupdate\*.*"
copy v:\\HomeServer\MonthDay.txt C:\vupdate
copy v:\\HomeServer\vupdate.exe C:\vupdate
cls
start "c:\vupdate\vupdate.exe"
v:\Logevent.exe -m \\HomeServer -s S -e 60000 "AntiVirus DAT Updates Complete"
goto :REG
:OK
v:\logevent.exe -m \\HomeServer -s S -e 61000 "AntiVirus DAT Update Resides on Drive"
goto :END
:FAILED
v:\logevent.exe -m \\HomeServer -s F -e 62000 "Missing AVCONSOL.EXE"
goto :END
:REG
if exist "c:\vupdate\*.reg" goto :REGRESIDES
copy v:\\HomeServer\*.reg c:\vupdate\*.reg
start "c:\vupdate\*.reg -y -y"
goto :REGLOG
:REGRESIDES
v:\Logevent.exe -m \\HomeServer -s S -e 61000 "Registry Edit Resides on Drive"
goto :END
:REGLOG
v:\Logevent.exe -m \\HomeServer -s S -e 60000 "Registry Has Been Updated"
goto :END
:END
call report.bat
net use v: /delete
exit
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Hostlist.Bat Contents For Review
@echo off
cls
001:1234
002:3456
003:4567
004:5678
005:6789
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}
Report.Bat Contents For Review
dumpel.exe -f batchrep.txt -s \\HomeServer -l application -m "User Event" -e 60000 61000 62000 -t
{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|