简体   繁体   English

无法通过nsis脚本注册我的64位dll?

[英]Not able to register my 64bit dll through nsis script ?

I have a 64bit dll which i'm able to register from command prompt with regsvr32. 我有一个64位的DLL,我可以通过regsvr32从命令提示符注册。 But the problem is when i try to register my dll through nsis script its not registered. 但问题是,当我尝试通过nsis脚本注册我的dll时,它没有注册。 I used RegDLL command in nsis script. 我在nsis脚本中使用了RegDLL命令。 Anyone knows what the problem may be? 谁知道问题可能是什么?

RegDLL is known to be problematic in anything but the simplest scenarios. 除了最简单的场景之外,RegDLL在任何事情上都是有问题的。 Google site:forums.winamp.com nsis for examples. 谷歌site:forums.winamp.com nsis的例子。

To make sure that registration of your DLL, type library, BHO, etc occurs successfully, you should use InstallLib . 要确保成功注册DLL,类型库,BHO等,应使用InstallLib It provides an option for x64 library installation (plus more!) 它提供了x64库安装的选项(还有更多!)

See http://nsis.sourceforge.net/Docs/AppendixB.html#B.1 for more details about library installation with NSIS. 有关使用NSIS安装库的更多详细信息,请参见http://nsis.sourceforge.net/Docs/AppendixB.html#B.1

you could use rundll32.exe instead: 你可以使用rundll32.exe代替:

ExecWait '"$SYSDIR\rundll32.exe" $INSTDIR\mydll.dll DllRegisterServer'

rundll32.exe is smart enough to launch the 64bit version of itself if you run it with a 64bit dll 如果你使用64位dll运行它,rundll32.exe足够聪明,可以启动自身的64位版本

ExitWait not found NSIS script. ExitWait找不到NSIS脚本。 ExitWait instead ExecWait. ExitWait而不是ExecWait。

you cound use: 你可以使用:

ExecWait '"$SYSDIR\\rundll32.exe" $INSTDIR\\mydll.dll DllRegisterSe ExecWait'“$ SYSDIR \\ rundll32.exe”$ INSTDIR \\ mydll.dll DllRegisterSe

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM