Archive: Passing paramters to dll registration


Passing paramters to dll registration
Hi there,

I would like to register a dll during install time.
Initially I used RegDll which worked fine. However, now I would like to pass additional paramters to the registration method. I figures I can use the Windows DllInstall method.
On the command line the follwing works fine for me:

regsrv32.exe /n /i:"my paramters" myDll.dll

I've tried all sorts of things to make it work in in NSIS. All attempts to use RegDll for this failed at compile time.
I've also tried (with all sorts of quoting variants):

ExecWait '"$SYSDIR\regsrv32.exe" /n /i:foo myDll.dll'

So far I had no success. Does anyone know how to do this. Shouldn't it be a common case to pass arguments (specified during the install process) to your dll?

Thanks a lot for your help.

Cheers
Hardy


Use the System plug-in to call the DllInstall function with the appropriate parameters. For example:

System::Call "$INSTDIR\myDll.dll::DllInstall(i 1, w 'foo')"

That works
Thanks a lot that worked.