(view source code of viprever.bat as plain text)
@ECHO OFF
IF NOT "%OS%"=="Windows_NT" GOTO Syntax
SETLOCAL ENABLEDELAYEDEXPANSION
SET Ping=1
IF NOT "%~1"=="" (
ECHO.%* | FINDSTR /R /C:"[/?:;]" >NUL && GOTO Syntax
PING %~1 -n 2 2>NUL | FIND "TTL=" >NUL || SET Ping=0
SET ProgramFiles=\\%~1\C$\Program Files
SET ComputerName=%~1
CALL :UpCase ComputerName
)
IF %Ping% EQU 1 (
FOR /F "tokens=*" %%A IN ('"%ProgramFiles%\Sunbelt Software\VIPRE\SBAMCommandLineScanner.exe"/displayvipreversion') DO SET VipreVer=%%A
FOR /F "tokens=*" %%A IN ('"%ProgramFiles%\Sunbelt Software\VIPRE\SBAMCommandLineScanner.exe" /displaylocaldefversion') DO (
FOR /F "tokens=1,2*" %%B IN ("%%~A") DO (
SET VipreDef=%%D %%B
)
)
SET VipreDef=!VipreDef:T= !
ECHO.%ComputerName% !VipreVer! !VipreDef!
) ELSE (
ECHO.%ComputerName%
)
ENDLOCAL
GOTO:EOF
:UpCase
:: Converts a variable VALUE to all upper case.
:: The argument for this subroutine is the variable NAME.
SET %~1=!%1:a=A!
SET %~1=!%1:b=B!
SET %~1=!%1:c=C!
SET %~1=!%1:d=D!
SET %~1=!%1:e=E!
SET %~1=!%1:f=F!
SET %~1=!%1:g=G!
SET %~1=!%1:h=H!
SET %~1=!%1:i=I!
SET %~1=!%1:j=J!
SET %~1=!%1:k=K!
SET %~1=!%1:l=L!
SET %~1=!%1:m=M!
SET %~1=!%1:n=N!
SET %~1=!%1:o=O!
SET %~1=!%1:p=P!
SET %~1=!%1:q=Q!
SET %~1=!%1:r=R!
SET %~1=!%1:s=S!
SET %~1=!%1:t=T!
SET %~1=!%1:u=U!
SET %~1=!%1:v=V!
SET %~1=!%1:w=W!
SET %~1=!%1:x=X!
SET %~1=!%1:y=Y!
SET %~1=!%1:z=Z!
GOTO:EOF
:Syntax
1>&2 ECHO.
1>&2 ECHO VipreVer.bat, Version 1.00 for Windows 2000 and later
1>&2 ECHO Return the version of Sunbelt Vipre AntiVirus and its virus definitions
1>&2 ECHO.
1>&2 ECHO Usage: VIPREVER [ remote_computer ]
1>&2 ECHO.
1>&2 ECHO Where: remote_computer is an optional computer name;
1>&2 ECHO (default is the local computer)
1>&2 ECHO.
1>&2 ECHO Written by Rob van der Woude
1>&2 ECHO http://www.robvanderwoude.com
IF "%OS%"=="Windows_NT" ENDLOCAL
page last modified: 2024-04-16; loaded in 0.0061 seconds