Archive: RegDLL / CLSID


RegDLL / CLSID
Hello,

can somebody please help me.

I am installing a foo.dll inside of my Installer at a specific place. Now, I want to register this dll, so it gets an registry entry inside of "HKCR // CLSID".

When I am calling RegDLL $MYINSTALLDIR/foo.dll, I receive a registry entry at "HKCR // CLSID". But this registry has path-information of the Installer.exe. But I want to have the path-info of the foo.dll inside of this registry entry.


Thanx,
Micha.


*First* install the DLL in the correct place, *then* register the DLL.

Do not have to much time at this moment so the help that I can offer now is that I can succesfully register a DLL via my NSIS script, so keep on trying and reading the manual, be persisten and you will succeed.

Oh, and if possible use NSIS v2.18 or higher. There is an important fix regarding registering a DLL if you build your installer on a POSIX platform like Linux or FreeBSD.

BTW An extract from your NSIS Script would make solving easier for others...


I see you still use RegDLL, this is the OLD way plz use:

Example below where you have to figure out the ${WEREYOUFILELOCALYCOMESFROM} and $WHEREITGOESTO and "myname.dll" ofcourse...

-------------------

!insertmacro InstallLib REGDLLTLB NOTSHARED REBOOT_NOTPROTECTED "${WEREYOUFILELOCALYCOMESFROM}myname.dll" "$WHEREITGOESTO\myname.dll" "$SYSDIR"

-------------------


Hey,

Thanx for your help.
But it won't work for me. I get the same result like with RegDLL. Let me explain.

My compiled Installer is located at "C:/Installer/Installer.exe"


In the script, I am calling:

!insertmacro InstallLib REGDLLTLB NOTSHARED REBOOT_NOTPROTECTED "localfolder\foo.dll" "destfolder\foo.dll" "destfolder"

When the Installer has been started and finished, I'll receive a new entry in the registry at

HKCR // CLSID // Unique-GUIID
-> Here you'll find a path of the Installer, i.e., "C:/Installer/Installer.exe". But I need the path of the dll, i.e., "destfolder\foo.dll"


Any ideas?


Thanx again,
Micha.


Seems like a problem with the DLL itself. The Library macros write nothing to HKCR\CLSID. You should contact the author of this DLL or fix the path on your program's first run.


Hm.

Is it possible to receive the Unique-GUIID which InstallLib has created?


Thanx.


InstallLib doesn't create a GUID for HKCR\CLSID. The GUID is used internally for something else, related to the RunOnce registry key. It's the DLL that sets this GUID in HKCR\CLSID.


The code in your DLL is not correctly written to determine the own DLL location when the DLL is registered. One way to solve this is do a ChangeDir to the destination Dir of the DLL first befor registering the DLL, this sometimes helps with DLL that are not correctly written.

I can assure you the NSIS registering the DLL implementation is correct.

Be persiten and think creative towards a solution and you will succeed.