Re: Scheduled tasks won't start



a) Yes
b) Instructions to automatically download and install the latest virus
defs from the Symantec website.

Here's the whole code from the cmd file copied/pasted:

@set COPY_XDB_TO="c:\Program Files\Symantec AntiVirus\"
@set RAPIDRELEASE=1
@set XDBTEMP=%temp%

@rem
==============================================================================================
@rem Set RAPIDRELEASE=1 to download repidrelease definitions,
RAPIDRELEASE=0 for fully QA'd definitions (standard).
@rem Change COPY_XDB_TO= to point to the SAV CE server directory (or
where you want the XDB file copied)
@rem you can also run the script directly from the SAV folder and it
will copy the definitions there.
@rem XDBTEMP is the temp folder the script will use while downloading
definitions, set to %temp% to use system default
@rem
==============================================================================================
@rem Script for downloading virus definition updates for
@rem Symantec Antivirus Corporate Edition version 8.x and 9.x
@rem This unsupported utility is provided for your convenience only.
@rem Symantec Technical Support cannot provide support for the
creation,
@rem use, or troubleshooting of Windows scripts.

@rem
==============================================================================================
@echo off


rem ========= check that OS is win2k or better ============
if not "%OS%" == "Windows_NT" goto BADOS
if "%APPDATA%" == "" goto BADOS

rem ========= make sure to be in script directory ============
if exist rtvscan.exe set COPY_XDB_TO=%CD%
for %%i in (%0) do @%%~di
for %%i in (%0) do @cd %%~pi
if exist rtvscan.exe set COPY_XDB_TO=%CD%

rem =========== get name/size of last file from "xdbdown.lastfile"
============
if not exist xdbdown.lastfile goto NOLAST
for /f "tokens=1" %%f in (xdbdown.lastfile) do set lastfile=%%f
for /f "tokens=2" %%f in (xdbdown.lastfile) do set lastsize=%%f
:NOLAST

rem ========= jump to temp dir ============
if not exist "%XDBTEMP%\xdbtmp" md "%XDBTEMP%\xdbtmp"
if exist "%XDBTEMP%\xdbtmp\*.xdb" del "%XDBTEMP%\xdbtmp\*.xdb"
pushd "%XDBTEMP%\xdbtmp"

rem =========== make ftp script for checking xdb directory on ftp
===========
echo open ftp.symantec.com> check.txt
echo anonymous>> check.txt
echo email@xxxxxxxxxxx>> check.txt
set xdbfolder=xdb
if "%RAPIDRELEASE%" == "1" set xdbfolder=rapidrelease
echo cd AVDEFS/norton_antivirus/%xdbfolder%>> check.txt
echo dir *.xdb chk.lst>> check.txt
echo bye>> check.txt

rem =========== get filename and size from ftp ============
if exist chk.lst del chk.lst
ftp -s:check.txt
if not exist chk.lst goto ERROR
for /f "tokens=9" %%f in (chk.lst) do set xdbfile=%%f
for /f "tokens=5" %%f in (chk.lst) do set xdbsize=%%f
if "%xdbfile%" == "" goto ERROR
if "%xdbsize%" == "" goto ERROR

rem =========== compare ftp name/size to local ============
if not "%xdbfile%" == "%lastfile%" goto DOWNLOAD
if not "%xdbsize%" == "%lastsize%" goto DOWNLOAD
popd
echo.
echo Already downloaded latest %xdbfolder% file: %xdbfile% - size
%xdbsize%
echo %date% %time% Already downloaded latest %xdbfolder% file:
%xdbfile% - size %xdbsize% >> XDBdown.log
goto END

:DOWNLOAD
rem ========= make ftp script for downloading new xdb file =========
echo open ftp.symantec.com> down.txt
echo anonymous>> down.txt
echo email@xxxxxxxxxxx>> down.txt
echo cd AVDEFS/norton_antivirus/%xdbfolder%>> down.txt
echo bin>> down.txt
echo hash>> down.txt
echo get %xdbfile%>> down.txt
echo bye>> down.txt

rem ============= download new file =================
ftp -s:down.txt
for %%i in (%xdbfile%) do @set newsize=%%~zi
if not "%newsize%" == "%xdbsize%" goto ERROR
move %xdbfile% %COPY_XDB_TO%
if exist %xdbfile% goto ERRORMOVE
popd
echo.
echo %xdbfile% %xdbsize% > xdbdown.lastfile
echo Downloaded new %xdbfolder% file: %xdbfile% - size %xdbsize%
echo %date% %time% Downloaded new %xdbfolder% file: %xdbfile% - size
%xdbsize% >> XDBdown.log
goto END


:ERROR
popd
echo.
echo ERROR: problem downloading %xdbfolder% definition file.
xdbfile=%xdbfile% xdbsize=%xdbsize% newsize=%newsize%
(lastfile=%lastfile% lastsize=%lastsize%).
echo %date% %time% ERROR: problem downloading %xdbfolder% definition
file. xdbfile=%xdbfile% xdbsize=%xdbsize% newsize=%newsize%
(lastfile=%lastfile% lastsize=%lastsize%). >> XDBdown.log
type "%XDBTEMP%\xdbtmp\chk.lst" >> XDBdown.log
echo. >> XDBdown.log
goto END

:ERRORMOVE
popd
echo.
echo ERROR: problem moving definition file to SAV folder.
COPY_XDB_TO=%COPY_XDB_TO% newsize=%newsize% (lastfile=%lastfile%
lastsize=%lastsize%).
echo %date% %time% ERROR: problem moving definition file to SAV
folder. COPY_XDB_TO=%COPY_XDB_TO% newsize=%newsize%
(lastfile=%lastfile% lastsize=%lastsize%). >> XDBdown.log
goto END

:BADOS
echo.
echo ERROR: this script needs Windows 2000 or better.
echo %date% %time% ERROR: this script needs Windows 2000 or better. >>
XDBdown.log
goto END

:END
if exist "%XDBTEMP%\xdbtmp\check.txt" del "%XDBTEMP%\xdbtmp\check.txt"
if exist "%XDBTEMP%\xdbtmp\down.txt" del "%XDBTEMP%\xdbtmp\down.txt"
if exist "%XDBTEMP%\xdbtmp\chk.lst" del "%XDBTEMP%\xdbtmp\chk.lst"
rd "%XDBTEMP%\xdbtmp"
set COPY_XDB_TO=
set RAPIDRELEASE=
set lastsize=
set lastfile=
set newsize=
set xdbsize=
set xdbfile=
set xdbfolder=
set xdbtemp=

.



Relevant Pages

  • Re: Command line FTP help
    ... rem Version 1.0 ... if ==GOTO NOPARAM1 ... echo An error occured whilst encrypting the file>> %log% ... > rem This part of the program encrypts the input file and produces an ...
    (microsoft.public.win2000.networking)
  • Re: dos batch programmer help!!
    ... REM Set up your two serial numbers here and ensure dir C:\TEMP\ exists ... if errorlevel 1 goto otherdisk ... echo Wrong diskin H: -- swap it to allow backup to continue! ...
    (comp.os.msdos.programmer)
  • Re: How to remove update
    ... rem Kills the runonce to prevent error message from being popped up in ... echo Press any key when ready to process ES650 or CTRL-C to quit ... >> installing it, it takes 5 ... > "If you download the tool from the Windows Update Web site, ...
    (microsoft.public.win2000.windows_update)
  • Re: dos batch programmer help!!
    ... REM Set up your two serial numbers here and ensure dir C:\TEMP\ exists ... if errorlevel 1 goto otherdisk ... echo Wrong diskin H: -- swap it to allow backup to continue! ...
    (comp.os.msdos.programmer)
  • [EXPL] MS-SQL Vulnerability Exploiting Trusted Connections
    ... rem Scan networks for SQL servers that allow access via db guest account ... Echo Ping Testing %2 ... If Not %Guest_Vulnerable%==Yes Goto Checks_Done ...
    (Securiteam)