Skip to content
⌘ NSIS Forum Archive

Help with Dll please

5 posts

trust11#

Help with Dll please

Hi all:
I have one problem with a Dll.
I have the same Dll in two versions. One older than the other.
Depending on the SO i have to register one or the other.
How can i do it? The InstallLib can do it?

Can you help me please?
trust11#edited
PD: I know how to detect the SO but not how to register one or the other because both have the same name and changing it wont work...
Red Wine#
Use logiclib e.g.
Call GetWindowsVersion
Pop $R0
${If} $R0 == 'XP'
!insertmacro InstallLib REGDLL NOTSHARED REBOOT_NOTPROTECTED XP_dllname.dll $SYSDIR\dllname.dll $SYSDIR
${ElseIf} $R0 == '2000'
!insertmacro InstallLib REGDLL NOTSHARED REBOOT_NOTPROTECTED 2000_dllname.dll $SYSDIR\dllname.dll $SYSDIR
${EndIf}
Afrow UK#
I see what you meant by SO now, you meant OS as in Operating System?

You can use that code, or even better:
!include LogicLib.nsh
!include WinVer.nsh
...
${If} ${AtleastWin2000}
...
${Else}
...
${EndIf}

Stu