Archive: RegDLL again


RegDLL again
Hi again :)

I've searched the forum and found the very useful RegDLL command to call the DllRegisterServer function.

I'm trying to convert my msi Installter to NSIS and besides the DllRegisterServer function it also registers a type library and COM Class Information.
The Actions are called "RegisterTypeLibrary" and "RegisterClassInfo". Now I'm wondering if there are more built-in functions for those msi-actions.

I'm not sure if the InstallLib command is what I'm looking for to get the same result as my msi installer with the RegisterTypeLibrary action.

Does anyone know what functions i should use?


See the manual,

Appendix B: DLL/TLB Library Setup


So the installation of a library in NSIS is the same as a registration of a library in msi?
I don't know the effect of a registration/installation of a dll, I just have to make the NSIS installer do the same as the msi, and that's why I have to ask such stupid questions ^^
And what about the "RegisterClassInfo" action?

Sorry, but as to that I'm a real beginner...


I guess the documentation is pretty clear on how one should use the header ;)


I've never said the opposite :)
I just wasn't sure if its the InstallLib function I was looking for, because I wanted the dll to be registered and not installed. (Because it is registerng what the msi installer does, and not installing)

I think the REGDLL libtype is what I'm looking for.

Unfortunately I get an exception that terminates the installer if I insert this in my script:

!insertmacro InstallLib REGDLL NOTSHARED NOREBOOT_NOTPROTECTED ${WINCLIENT_FILES}\fsctoolmgr.dll $INSTDIR\fsctoolmgr.dll $INSTDIR

RegDLL $INSTDIR\fsctoolmgr.dll


What happens if you try to manually registry the dll with regsvr32?

Stu


It works with regsvr32.
It is definitely not a corrupted DLL, because the msi Installer works too.
I've used dependency walker, and the DLL uses nothing special, just windows dlls.

Is it possible that there are some wrong registry entries?
I have installed and uninstalled the App with the msi installer, so perhaps it has left some reg entries ?

Well and the msi installer registers the dll 3 times: in the Class, SelfReg and TypeLib tables. I have to create an NSIS installer that does exactly the same, so I use Installib and RegDLL.
At the moment I've no idea what command I shall use for the 3rd table (Class), and maybe thats the reason. Some registry keys that deny the NSIS registration.

msdn says the Class table is for registering dlls with COM-server related information, so if somebody has an idea how I can do the same in NSIS, please tell me ;)
I've searched for hours and found nothing :/

€dit: Oh that could be helpful:
the (NSIS) installer creates registry entries (in CLSID and TypeLib), the exception occurs at the end of the installation progress - or it doesn't affect it. I can close the installer with the Finish button, it doesn't hang or so. The app works fine, but I can't yet test if the dll registration part went well, although i think so because there are registry entries.

Regards, EnCey


I found out that I can use
!insertmacro InstallLib TLB ...
!insertmacro InstallLib DLL ...

without errors. But if i try to use REGDLL or REGDLLTLB the "Select Debugger" window appears after the installation (when the finish page is visible).
Also I can't use the REGDLL command with this dll, but with another (that doesn't contain a type library).
Does anyone know what I'm doing wrong?


EnCey, did you find a solution for this? What did you ultimately end up doing?

I'm trying to do the same type of MSI to NSIS conversion and have some COM dll that I want to make sure are registered in the same way they were before.


I'm using regsvr32 in my installer.
The result is the same as with the msi, although the msi uses SelfReg, TypeLib and a third talbe (I've forgotten its name).