Batch Processing Application: Use flashget to check for McAfee superdat updates

Source: Internet
Author: User

Because of a script, use McAfee superdat for virus detection (http://blog.csdn.net/scz123/archive/2006/11/02/1362566.aspx), but when the virus code is updated, you have to go to the website to manually download, fixed this script, run the virus check function after flash get is downloaded to enable automatic check and download of McAfee superdat updates. CopyCode The Code is as follows: @ echo off
Echo.
Echo ===================================================== ==============
Echo flashget downloads the detection script to automatically Update McAfee superdat
Echo created by scz20061102
Echo ===================================================== ==============
Rem use the flashget virus detection function to specify this script
Rem mainly uses flashget to download the Update page.
Rem asked flashget1.5 and later versions to regularly download the Update page: "E: \ Program Files \ flashget \ flashget.exe" http://www.mcafee.com/apps/downloads/security_updates/superdat.asp? Region = cn & segment = enterprise F: \ Bak \ checkmcafee
Rem is configured with flash get for virus detection. After downloading, the script is run and supperdat is automatically updated.
REM and regularly re-download the page.

Path, file name, and extension of the files downloaded by Rem
Set filepath = % ~ Dp1
Set filename = % ~ N1
Set fileext = % ~ X1

Rem flashget path
Set flashget = "E: \ Program Files \ flashget \ flashget.exe"

Rem superdat storage path
Set datpath = F: \ Bak \ update \

Storage path of ASP page for REM check
Set asppath = F: \ Bak \ checkmcafee \

Rem string comparison
Echo.
Echo checks the format and location of the downloaded file...
(Echo-% filepath %-| find/I "-% datpath %-"> NUL) & (echo-% filename %-| find/I "-sdat"> NUL) & (echo-% fileext %-| find/I "-.exe-"> NUL) & goto checkdat
(Echo-% filepath %-| find/I "-% asppath %-"> NUL) & (echo-% filename % fileext %-| find/I "-superdat. ASP-"> NUL) & goto checkasp

Echo download to file: % filepath % filename % fileext %, no need to handle
Goto end

: Checkdat
Echo.
Echo downloaded to superdat: % filename % fileext %, processing...
CD/d % datpath %
Ren % filename % fileext % McAfee. % filename % fileext %
Echo deletes old superdat...
For/F "Skip = 1" % I in ('dir McAfee *. EXE/TC/o-D/B 2 ^> NUL ') Do (DEL % I)
Echo notification to release McAfee superdat...
Start "" McAfee. % filename % fileext %/E c: \ Mcafee
Echo superdat processing is complete.
Goto end

: Checkasp
Echo.
Download echo to superdat. asp...
Set url =
Set sdatname =
CD/d F: \ Bak \ checkmcafee
Echo analysis superdat. asp...
For/F "tokens = 3,4 * delims = <> =" % I in ('Type superdat. ASP ^ | find "simplified/sdat" ') Do (set url = % I & set sdatname = % J)
Set ver0 = % sdatname: sdat = %
Set ver1 = % ver0:. EXE = %
Echo analysis result: supperdat version: % ver1 %

CD/d % datpath %
If exist % sdatname % Ren % sdatname % McAfee. % sdatname %
If exist McAfee. % sdatname % (ECHO has the latest version & goto end) else (echo this version has not been downloaded, notification flashget download & start "" % flashget % URL % datpath %)
Goto end

: End
Echo.
Pause

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.