Hi,
I am trying to register a dll and have tried using the following commands:
ExecWait 'regsvr32.exe /s "$SYSDIR\my.dll"
RegDLL $SYSDIR\my.dll
!insertmacro InstallLib REGDLL SHARED REBOOT_NOTPROTECTED "..\..\..\bin\Windows\my.dll" $SYSDIR\my.dll $SYSDIR
And none have worked.
It will work (all three of them) if I run the installation again (when I guess the dll is already present in the sysdir).
Please help.
Tom
PS. I am using NSIS 2.31
Installing a dll and registering it
11 posts
InstallLib will extract the dll for you. The first two would require you to extract the dll first with the File instruction.
Stu
Stu
Thanks,
But I can't even get InstallLib to work.
T.
But I can't even get InstallLib to work.
T.
Hi,
Allthough I appreciate the quick response, can you point me in the right direction?
T.
Allthough I appreciate the quick response, can you point me in the right direction?
T.
Your question seems awfully similar to another recent question. The answer is the same, your DLL is at fault.
Hi,
The first time it fails, the second time it works (dll already present).
regsvr32.exe works.
is there any tracing I can enable to see what is going wrong (I am not too familiar with the error handling of NSIS)?
Regards,
T.
The first time it fails, the second time it works (dll already present).
regsvr32.exe works.
is there any tracing I can enable to see what is going wrong (I am not too familiar with the error handling of NSIS)?
Regards,
T.
How does regsvr32 suddenly work?
There's not much to trace here. If the DLL is called (which you can verify with anything from Dependency Walker to windbg), there's nothing else to it.
There's not much to trace here. If the DLL is called (which you can verify with anything from Dependency Walker to windbg), there's nothing else to it.
Hi,
Slight mis-communication here.
These three don't work (unless called for the second time):
ExecWait 'regsvr32.exe /s "$SYSDIR\my.dll"
RegDLL $SYSDIR\my.dll
!insertmacro InstallLib REGDLL SHARED REBOOT_NOTPROTECTED "..\..\..\bin\Windows\my.dll" $SYSDIR\my.dll $SYSDIR
But calling regsvr32.exe from the command line does work.
Is there a way to get the error code back from the NSIS calls (is there an Error var that is set?)?
Thanks,
T.
Slight mis-communication here.
These three don't work (unless called for the second time):
ExecWait 'regsvr32.exe /s "$SYSDIR\my.dll"
RegDLL $SYSDIR\my.dll
!insertmacro InstallLib REGDLL SHARED REBOOT_NOTPROTECTED "..\..\..\bin\Windows\my.dll" $SYSDIR\my.dll $SYSDIR
But calling regsvr32.exe from the command line does work.
Is there a way to get the error code back from the NSIS calls (is there an Error var that is set?)?
Thanks,
T.
Use ExecWait with a 3rd parameter to get the exit code.
ExecWait 'regsvr32.exe /s "$SYSDIR\my.dll" $R0
; $R0 == 0 or ?
Stu
ExecWait 'regsvr32.exe /s "$SYSDIR\my.dll" $R0
; $R0 == 0 or ?
Stu
Found the error, there was a dll dependency, but after so many copy pastes I must have tried regsvr32.exe when everything was copied over.
Thanks again.
T.
Thanks again.
T.
edit: ignore me, issue fixed