Archive: OCX versions - best way to do it?


Hi,

I have to install COMDLG32.OCX on my target system, and I need to make sure it is at least the version I have (6.0 something).
How do I only install it when it's a newer version?
At the moment I only install when the file doesn't exist yet. Using IFNEWER doesn't work, because NSIS takes the file *creation* time instead of the file *modification* time! That's not right, I think.


DLL and OCX versions

The IfNewer option is a great addition, but some sort of version checking is still really needed. I know users get mighty mad if you stuff their system up with an old DLL or OCX.

At least the new version of NSIS allows you to copy the existing files into a backup folder first, just to be safe.

I notice there was a patch sent in around version 1.1j that had OCX and DLL version checking, anyway to integrate this back in to the new versions?

I'm cursed with only being able to code in VB, otherwise I would do it myself. :-)

Anybody want to write a C++ exe that can be called from the installer and passed parameters?

Something like:

Delete "$TEMP\Newer.txt"
ExecWait CompVer "$SYSDIR\mfc42.dll" "$TEMP\mfc42.dll" "$TEMP\Newer.txt"
IfFileExists "$TEMP\Newer.txt" Jump or Extract file



http://www.mvps.org/vbnet/index.html...searchinfo.htm


Have a look at this... It can retrieve file version info and it's VB. I haven't got time right now to write a version compare app, but this might work... As long as you're distributing the VB Runtimes with your project, that is.