Old 12th April 2001, 18:23   #1
Koen van de Sande
Senior Member
Join Date: Mar 2001
Location: Holland
Posts: 269
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.


~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:

Koen van de Sande
Van de Sande Productions
TibEd.net | VPatch
Koen van de Sande is offline   Reply With Quote
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump