NSIS打包软件报(安装失败)

1、报错的界面提示
运行: RunDll32 setupapi,InstallHinfSection DefaultInstall 132 C:\Windows\system32\drivers\XXX.inf

2、报错的进程rundll32.exe

3,原因,驱动错误导致(我这个操作系统是win 764专业版简易版本,更新完后就没有问题了SP1,猜测是那个更新包更新了RunDll32.exe 使得 接口 InstallHinfSection 可以正常执行

 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
好的,下面是一个简单的 NSIS 脚本,用于打包一个名为 MySoftware 的软件: ``` ; Script generated by the HM NIS Edit Script Wizard. ; Define the name and the output file of the installer Name "MySoftware" OutFile "MySoftwareInstaller.exe" ; Define the default installation directory InstallDir "$PROGRAMFILES\MySoftware" ; Define the components to be installed ComponentGroup "Main" Component "MySoftware" Component "Start Menu Shortcut" ; Define the files to be installed Section "MySoftware" Section1 SetOutPath "$INSTDIR" File "MySoftware.exe" File "README.txt" SectionEnd ; Define the Start Menu shortcut Section "Start Menu Shortcut" Section2 CreateDirectory "$SMPROGRAMS\MySoftware" CreateShortCut "$SMPROGRAMS\MySoftware\MySoftware.lnk" "$INSTDIR\MySoftware.exe" "" "" 0 SectionEnd ; Define the uninstaller Section "Uninstall" Delete "$INSTDIR\MySoftware.exe" Delete "$INSTDIR\README.txt" Delete "$SMPROGRAMS\MySoftware\MySoftware.lnk" RMDir "$SMPROGRAMS\MySoftware" RMDir "$INSTDIR" SectionEnd ; Define the installer sections SectionGroup /e "Install" !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_INSTFILES SectionGroupEnd SectionGroup /e "Uninstall" !insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_INSTFILES SectionGroupEnd ; Define the installer attributes !define MUI_COMPONENTSPAGE_SMALLDESC !define MUI_UNICON "uninstall.ico" !define MUI_ICON "installer.ico" !insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Docs\Modern UI\License.txt" !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_FINISH !insertmacro MUI_LANGUAGE "English" ``` 这个脚本将 MySoftware.exe 和 README.txt 安装到 $PROGRAMFILES\MySoftware 目录下,并创建一个“开始菜单”快捷方式。当用户卸载软件时,脚本将删除这些文件和快捷方式。除此之外,脚本还定义了安装程序的界面和属性。请注意,这只是一个简单的示例脚本,您可以根据自己的需要进行修改和扩展。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Ma_Hong_Kai

微信 2936729162

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值