Removed CompareDLLVersions ?
Why is CompareDLLVersions removed in NSIS 1.6? I need it for my installers :mad: Is there other function I can use?
Thanx.
Joost
Archive: Removed CompareDLLVersions ?
Removed CompareDLLVersions ?
Why is CompareDLLVersions removed in NSIS 1.6? I need it for my installers :mad: Is there other function I can use?
Thanx.
Joost
Other DLL function (from the version history):
Removed CompareDLLVersions, CompareFileTimes, added GetDLLVersion, GetFileTime, GetDLLVersionLocal, GetFileTimeLocal, and IntCmpU.
You could use GetDLLVersion and GetDLLVersionLocal instead of CompareDLLVersions
See UpgradeDLL in functions.htm for an example.
~ Florian
Thanks.
So i should use something like: If GetDLLLocalVersion(DLLName) > GetDLLVersion(DLLName) then CopyNewDLL ?
I'm new to the NSIS system, so i'll have to find out how I can do this is the NSIS language :D
I think you could use it in this way:
ClearErrors
GetDLLVersionLocal "test.dll" $0 $1
GetDLLVersion "$SYSDIR\test.dll" $2 $3
IfErrors upgrade_dll
IntCmpU $0 $2 noupgradedll noupgrade_dll upgrade_dll
IntCmpU $1 $3 noupgrade_dll noupgrade_dll
upgrade_dll:
UnRegDLL "$SYSDIR\test.dll"
File /oname="$SYSDIR\test.dll" "test.dll"
RegDLL "$SYSDIR\test.dll"
noupgrade_dll:
I just wrote some code similar to your code, with some reboot stuff included. But, I only compare $0 and $2, and it seems to work. Should I also compare $1 and $3 ?
Strange, I've done some testing and now I'm using your code, but it always detects that the integers are equal, but they are not :(
Problem solved ;)
I'll have to compare only the large integers, because only the build numbers are different.
IntCmpU $1 $3 noupgradedll noupgrade_dll upgrade_dll
Now the next problem :D
How can I register a DLL on reboot ??
Hi Joost,
I don't know how to register a DLL on reboot, but you could use the RegDLL command to register your DLL immediately.
~ Florian
That's true. When the DLL is not in use, I register it with RegDLL, but when the DLL is in use, it should be done after the new DLL is install (on reboot).
Only an idea ;):
Try to write an entry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce to make a call to regsvr32.exe yourdll.dll.
~ Florian
Good idea :D
I have to find out how to make this 'silent'. And, is this being called AFTER the NSIS 'Rename on reboot'?
I'll check where NSIS puts the 'Rename on reboot' stuff :)
In Win2000: It it stored in a PendingRenameOperations key.
Maybe I should write a piece of code that checks which one is called first.
For the solution:
http://forums.winamp.com/showthread....687#post415687