Jump to content

Version Checker / Update Check


Recommended Posts


Posted
Does anybody know of any program which checks if your favourite programs have been updated. I want to have customized lists of programs to be checked.
Right click on a favourite; then click on Subscription :whistle:

Or copy your favouties to "C:\WINDOWS\Offline Web Pages".

Posted

Ok, it is quite simple script...

there R four files:

Update.bat (main executable), Update.ini (Global settings), internal-Download.bat (internal file) and 2download.txt (list of what to download).

Update.bat:

@echo off
If "%1" EQU "" Echo You must provide parameter with update group! && Goto :EOF
Set UpdateGroup=%1
Title %UpdateGroup% updating
Set MainDirectory=%cd%
If not exist "%MainDirectory%\Update.ini" Echo Missing Update.ini file!!! && Pause && Goto :EOF
For /f "usebackq tokens=1,2 delims==" %%i IN (`type "%MainDirectory%\Update.ini"`) DO Set %%i=%%j

If not exist "%MainDirectory%\%UpdateGroup%" mkdir "%MainDirectory%\%UpdateGroup%"
cd %UpdateGroup%

Echo Removing log files
If Exist "%LogDirectory%\%UpdateGroup%\Details" rmdir /q /s "%LogDirectory%\%UpdateGroup%\Details"

Echo Removing error log
If Exist "%LogDirectory%\%UpdateGroup%\error.log" del /q "%LogDirectory%\%UpdateGroup%\error.log"

Echo Creating log directory
mkdir "%LogDirectory%\%UpdateGroup%\Details"

Echo Creating temp file for case where nothing is updated
echo. > "%MainDirectory%\%UpdateGroup%\working.txt"

FOR /F "tokens=1,2,3,4 delims=; " %%i in (..\2download.txt) do if /i %%j EQU %UpdateGroup% call ..\internal-Download.bat %%i %%j %%k %%l

If exist "%MainDirectory%\%UpdateGroup%\working.txt" echo %date:~3,11%;No newer versions available >> "%LogDirectory%\%UpdateGroup%\aktualizacie.log"

Internal-Download:

@echo off

rem %1 = Product name
rem %3 = Log file name
rem %4 = URL address

Echo Downloading %1
wget --timestamping --output-file="%3" --server-response --proxy=%boolProxy% %4
call tfind.com /e "Saved" %3
set update=%errorlevel%
if %update% GTR 0 (
Echo %1 updated
If exist "%MainDirectory%\%UpdateGroup%\working.txt" del /q "%MainDirectory%\%UpdateGroup%\working.txt" > nul
echo %date:~3,11%;%1;Success>> "%LogDirectory%\%UpdateGroup%\aktualizacie.log"
move /Y %3 "%LogDirectory%\%UpdateGroup%\Details"
Goto :EOF
)

call tfind.com /e "no newer" %3
set nonewer=%errorlevel%
If /i %nonewer% GTR 0 (
move /y %3 "%LogDirectory%\%UpdateGroup%\Details"
Goto :EOF
)

Echo %date:~3,11%;%1;Error! >> "%LogDirectory%\%UpdateGroup%\error.log"
Echo %date:~3,11%;%1;Error! >> "%LogDirectory%\%UpdateGroup%\aktualizacie.log"
move /y %3 "%LogDirectory%\%UpdateGroup%\Details"
rem If %update% GTR 0 cscript //nologo mail.vbs /update:%1

Update.ini

boolProxy=on
http_proxy=http://proxy.domain.com:3128
LogDirectory=\\server\logs

2Download.txt

KillBits;Spyware;killbit.log;http://www.spywareguide.com/blocklist.reg
RestrictedSites;Spyware;restrict.log;https://netfiles.uiuc.edu/ehowes/www/res/ie-spyad.zip
RestrictedSites2;Spyware;rest2.log;https://netfiles.uiuc.edu/ehowes/www/res/ie-spyad2.zip
Spybot;Spyware;spybot.log;http://www.spybotupdates.com/updates/files/spybotsd_includes.exe
SpywareBlaster;Spyware;blaster.log;http://ct7support.com/downloads/javacool/u3201/spywareblastersetup32.exe
CWShredder;Spyware;shredder.log;http://cwshredder.net/bin/CWSInstall.exe
BugOff;Spyware;bugoff.log;http://computercops.biz/zx/Merijn/bugoff.zip
HijackThis;Spyware;hjt.log;http://downloads.subratam.org/hijackthis.zip
ProcessExplorer;Spyware;procexp.log;http://www.sysinternals.com/files/procexpnt.zip
WMPScriptFix;Spyware;wmpfix.log;http://www.wilderssecurity.net/downloads/WMPscriptfix.exe
AutoRuns;Tools;autorun.log;http://www.sysinternals.com/files/autoruns.zip

U just need to setup following things:

Update.ini

boolProxy - enable or disable proxy server. Values must be 0 or 1

http_proxy - address of the proxy server (proxy:port)

LogDirectory - directory where should log files be stored

Then U need to edit 2Download.txt.

Every line consist of following elements (divided by semicolon):

name;category;log name;URL

Files required:

Tfind and wget

Usage:

Update.bat name_of_update_group

For example if you want to update your antispyware collection, U use command

update spyware

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...