2017-02-16 29 views
0

我使用electron-builder爲我的電子應用程序創建NSIS Windows安裝程序。在安裝過程中,我需要運行附帶的DPInst.exe以確保驅動程序已安裝。添加NSIS腳本與電子生成器在安裝過程中運行DPInst.exe

我可以告訴electron-builder比我包括自定義腳本:

"nsis": { 
    "include": "build/installer.nsh" 
} 

但我不能工作,應在installer.nsh

文檔說,我需要的東西像什麼:

!macro customInstall 
    !system "echo '' > ${BUILD_RESOURCES_DIR}/customInstall" 
!macroend 

而且我已經看到了一些NSIS命令來運行DPInst.exe

ExecWait '"$INSTDIR\resources\DPInst.exe" /sw' 

但我不確定如何將它們組合起來,因爲我無法弄清楚語法!

回答

2

好吧,這很明顯。我只需要將兩者結合起來:

!macro customInstall 
    ExecWait '"$INSTDIR\resources\DPInst.exe" /sw' 
!macroend 
相關問題