我正在使用electron-builder为我的电子应用程序创建NSIS安装程序。在安装过程中,我需要运行包含的DPInst.exe,以确保安装了驱动程序。
我可以告诉electron-builder,而不是包括一个自定义脚本:
"nsis": {
"include": "build/installer.nsh"
}但我想不出installer.nsh里应该是什么
医生说我需要这样的东西:
!macro customInstall
!system "echo '' > ${BUILD_RESOURCES_DIR}/customInstall"
!macroend我看到了一些运行DPInst.exe的NSIS命令
ExecWait '"$INSTDIR\resources\DPInst.exe" /sw'但我不知道如何组合它们,因为我无法计算出语法!
发布于 2017-02-16 16:43:58
很明显,♂️。我只需要把两者结合起来:
!macro customInstall
ExecWait '"$INSTDIR\resources\DPInst.exe" /sw'
!macroend发布于 2021-05-19 11:10:02
对我来说,只有ExecWait '"$INSTDIR\resources\DPInst.exe" /sw'因为权限问题而无法工作。
我不得不添加RequestExecutionLevel admin
installer.nsh看起来-
!macro customHeader
RequestExecutionLevel admin
!macroend
!macro customInstall
ExecWait '"$INSTDIR\ABC_Setup.exe" /sw'
!macroend https://stackoverflow.com/questions/42277191
复制相似问题