Archive: Can't register dll and ocx


Can't register dll and ocx
Please help!
I try to register DLL and OCX:

!insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_NOTPROTECTED msvcr70.dll $SYSDIR\msvcr70.dll $SYSDIR

Compile log:

!insertmacro: InstallLib
warning: unknown variable/constant "ALREADY_INSTALLED" detected, ignoring (macro:InstallLib:49)
!insertmacro: end of InstallLib
SectionEnd


Installation log:

Can’t find symbol: DllRegisterServer

DLL copy into sysdir but not register. What I do wrong?


Var ALREADY_INSTALLED
!insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_NOTPROTECTED msvcr70.dll $SYSDIR\msvcr70.dll $SYSDIR

"Var" instruction has to be outside sections and functions and prefferably at the top of your script.


Thanks!
Var ALREADY_INSTALLED is working.:)
But Installation log:
Can’t find symbol: DllRegisterServer:(
One more questions please!:rolleyes:
I can’t find in user manual how to register fonts files(*.ttf).


That means the DLL shouldn't be registered. For fonts, search the forum and the wiki.


In your first example, you mention the file 'msvcr70.dll'.

This is a file included with MS .NET Framework, which I'm fairly certain is protected by Windows File Protection. This means that the only way you'd be able to install it is via Microsoft's own installation (or Windows installer merge module).

Or I could be wrong...


you can use : upgradeDLL
!insertmacro UpgradeDLL XXX.dll "$PROGRAMFILES\XXX.dll" "$INSTDIR\Temp"

this macro exists in example given by the NSIS installer