概述:使用C#命令行安裝MVC3網站。該應用程序在Win7,win8,server 2008中正確安裝2013.在正確配置IIS之後,相同的安裝程序不能在window10中工作。無法在Window10中使用命令行安裝網站msi
錯誤消息: 產品:Web客戶端 - 此設置需要Internet Information Server 5.1或更高版本以及Windows XP或更高版本。此設置無法安裝在Windows 2000上。請安裝Internet Information Server或更新的操作系統,然後再次運行此設置。
事件日誌(MsiInstaller)中的錯誤消息: Windows安裝程序安裝了該產品。產品名稱:Web客戶端。產品版本:3.x.xx.產品語言:1033.製造商:xxxx。安裝成功或錯誤狀態:1603年
安裝程序代碼:
Process p = new Process();
p.StartInfo.FileName = msiexec.exe;
p.StartInfo.Arguments ="/qn /i \"" + Settings.InstallationDirectory + "Website\\WebClient.msi\"";
p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
p.Start();
p.WaitForExit();
無法看到安裝網站IIS。
我第一次使用Visual Studio安裝程序模板,也許這是特定於VS2015(我不知道),但我沒有意識到,做了這些更改後,您必須右鍵單擊該項目然後點擊'Build',然後再次右鍵單擊該項目並點擊'Install'。只是點擊安裝來測試它不會因爲某種原因重建它。 –