![](/img/trans.png)
[英]How to change TARGET DIRECTORY/path of installation for EXE file during SILENT installation
[英]EXE silent installation
您是否嘗試過以下命令?
Start-Process -Wait -FilePath "C:\Setup.exe" -ArgumentList "/S" -PassThru
請試試這個:
$pathvargs = {C:\Temp\UpgradeClientInstaller\setup.exe /S /v/qn }
Invoke-Command -ScriptBlock $pathvargs
嘗試這個:
Start-Process -Wait -FilePath C:\setup.exe -Argument "/silent" -PassThru
Start-Process -Wait -FilePath "\full\path\setup.exe" -ArgumentList '/S','/v','/qn' -passthru
執行文件的引號不一定是。
我知道這個帖子很舊,但我覺得我可以分享一些關於這個問題的見解
幾年前我不得不做類似的事情。 當您在提示上單擊“安裝”時,它所做的就是將證書添加到 TrustedPublisher 存儲中。 如果您在運行安裝程序之前手動將其添加到證書管理器,則可以避免該提示。
我發現如果你在測試機器上安裝程序,你可以從certmgr.msc中導出Cert。 然后您可以使用以下方法安裝證書:
certutil -addstore "TrustedPublisher" <PathTo.cerFile> >nul 2>nul
這會將證書安裝到 TrustedPublisher 存儲,因此無需顯示該消息。
我希望這可以幫助 Ramesh 以及將來發現它的任何其他人
使用此命令它不會要求單擊下一步並安裝軟件。
Start-Process -Wait -ArgumentList "/silent" -PassThru -FilePath 'C:\\Users\\filename.exe'
您的問題似乎是 Windows UAC 而不是腳本本身。
這可能有風險 - 但它有效。
添加 -NoNewWindow 以停止彈出
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.