Hi everyone,

I made a little exe which creates a textfile if a file has a higher version number. I hope you like it.

Please note: it uses Visual Basic 6.0 Runtimes!
So this program is only useful when installing Visual Basic applications which include runtimes.

Source code has been included, modify it as you like. Maybe someone can rewrite this in Visual C++?

I shouldn't take full credit for this, because I used the version code made by Randy Birch: http://www.mvps.org/vbnet, except for Sub Main, which has been created by me so it can check version differences between 2 files from command line. If 2nd file is newer, the 3rd filename is created.


Example:

~CHKVER C:\Windows\System\Comdlg32.ocx*C:\temp\Comdlg32.ocx*C:\temp\~chk_new.txt

'My website: http://www.tibed.net
I hope this works for you. Here's an example on how to use it in NSIS.

SetOutPath $TEMP
File ~ChkVer.exe
File Comdlg32.ocx
SetOutPath $SYSDIR

Delete $TEMP\~chk_new.tmp
ExecWait '"$TEMP\~ChkVer.exe" $SYSDIR\Comdlg32.ocx*$TEMP\Comdlg32.ocx*$TEMP\~chk_new.tmp'
IfFileExists $TEMP\~chk_new.tmp 0 2
File Comdlg32.ocx
Delete $TEMP\Comdlg32.ocx

RegDLL $SYSDIR\Comdlg32.ocx

My e-mail: kvds2000@bigfoot.com
If you think this code su**s, then don't use it.

Oh, and finally, here's the URL:
http://www.vdsp.myweb.nl/chkver.zip