我正在嘗試使用腳本安裝應用程序。此應用程序在IIS中的默認網站下創建一個虛擬目錄。 我已經寫了這個腳本。這是正確的腳本還是我錯過了一些東西。使用命令行寫入IIS
cd C:\Users\Administrator\Desktop
msiexec /qb /i ZFPSetup.msi INSTALLLOCATION="C:\Program Files (x86)\Application" TARGETVDIR="ZFP" WIXUI_EXITDIALOGOPTIONALCHECKBOX=1 /l*v "C:\log.txt"
iisvdir /create Default Web Site ZFP C:\Program Files (x86)\Application\ZFP
call "C:\Program Files (x86)\Application\StartKaraf.bat" echo error
我得到以下錯誤:
MSI (s) (28:D0) [04:25:58:897]: Invoking remote custom action. DLL: C:\Windows\Installer\MSIF886.tmp, Entrypoint: WriteIIS7ConfigChanges
WriteIIS7ConfigChanges: Error 0x80070002: Site not found for create application
WriteIIS7ConfigChanges: Error 0x80070002: Failed to configure IIS application.
WriteIIS7ConfigChanges: Error 0x80070002: WriteIIS7ConfigChanges Failed.
CustomAction WriteIIS7ConfigChanges returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
我不擅長的PowerShell。我從某處獲得了這個腳本。如果我必須包含以上功能+卸載和安裝,我需要對此腳本做些什麼更改。你能幫忙嗎? –
劇本太長而無法過去。你可以給我一個PowerShell腳本。 –