安裝專案設定Custom Actions增加豁免回送指令

InstallShield Limited Edition for Visual Studio 安裝專案

設定 Custom Actions 執行豁免回送指令LoopbackExempt

需求

應用程式安裝完後需要執行一些特殊的指令

EX:

我有一個console,但是需要在客戶端執行豁免指令(LoopbackExempt),才能讓應用程式運行正常,我希望在安裝完成後指令也可以執行完。

指令

 回送豁免指令

CheckNetIsolation.exe LoopbackExempt -a -n=App.ae0297001.a8d97.a4cb1.a8a3c.af1993e7c259d_8wekyb3d8bbwe

CheckNetIsolation.exe 這個執行檔在 C:\Windows\System32\

 安裝完成後事件

開啟你的安裝專案展開【5 Define Setup Requirements an Actions】.【Custom Actions】

【Custom Actions During Installation】    安裝的時候

【Custom Actions During Maintenance】 修復的時候

【Custom Actions During Uninstallation】解除安裝的時候

在安裝完成後加入一個Action,而這Action會去執行一個exe檔

【Custom Actions During Installation】.【After Setup Complete Success dialog】.【右鍵】.【New EXE】

設定CheckNetIsolation.exe的路徑,是在目標電腦上的C:\Windows\System32\

【Source Location】選擇【File Exists on Target Computer】

【File Location】選擇【SystemFolder】

填入要執行的指令

【File Name adn Command Line】CheckNetIsolation.exe LoopbackExempt -a -n=App.ae0297001.a8d97.a4cb1.a8a3c.af1993e7c259d_8wekyb3d8bbwe

設定完成後記得儲存並建置,新的安裝檔就會友安裝完成後執行豁免指令的效果了。