zanz
10th September 2008 18:40 UTC
x64 system - InstallLib problem
Using InstallLib, I'm trying to register a few DLLs on a x64 system. But the DLLs do not get registered. However, instead of InstallLib, if I use RegDLL, the dlls register fine. Also, the same syntex works fine on a 32 bit system.
Here's how I setup my script:
1) !define LIBRARY_X64 is defined at the beginning of the script.
2) SetRegView 64 is also set.
3) !insertmacro InstallLib REGDLL SHARED REBOOT_NOTPROTECTED "${SOURCE_DIR}\my.dll" "$COMMONFILES64\myDLLFolder\my.dll" $COMMONFILES64 is the syntex to register the DLL (it works fine on a 32 bit system, just doesn't work on 64 bit system).
It'll be a great help if someone can point out what am I missing here? Why it's not working on 64 bit system? Since it's a shared DLL, my concern is that it might be in use when the installer is updating the DLL, and might throw an error. Therefore, InstallLib is the solution I need, but I can't get it to work. Please help!
kichik
10th September 2008 21:43 UTC
Something doesn't make sense here. How does RegDLL work if it's a x64 DLL? The installer is always 32-bit and can therefore never load x64 DLL. You're probably using a 32-bit DLL and should therefore not define LIBRARY_X64.
zanz
10th September 2008 22:36 UTC
Thanks for your reply kichik. I have been trying a lot things to make this work.
It doesn't make any difference if I define LIBRARY_X64 or not. InstallLib cannot register the DLL. I've tested it both ways. The DLL i have is compatible with both 32 and 64 bit systems, but needs to be installed and registered at Common Files path.
Any other hints?
zanz
10th September 2008 23:25 UTC
I can also register the DLL successfully by calling, ExecWait '"$SYSDIR\regsvr32.exe" /s "DLL_Path\MyDll.dll"'
It's just that InstallLib REGDLL isn't working :-(
kichik
12th September 2008 20:41 UTC
I suggest you debug the registration process by inserting a break point into your DllRegisterServer and see what happens there.