免互動安裝InstEd、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id InstEd.InstEd -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id InstEd.InstEd -e --silentwinget uninstall --id InstEd.InstEd -e --silent依安裝檔
32位元 · MSI · 所有使用者 · en-US
靜默安裝
msiexec /i InstEd-1.5.15.26.msi /qn /norestart寫入記錄檔
msiexec /i InstEd-1.5.15.26.msi /qn /norestart /l*v "%TEMP%\insted-install.log"解除安裝
msiexec /x {AC7EA575-6F1D-4365-A66E-B84FC18A784D} /qn /norestart- MSI產品代碼
- {AC7EA575-6F1D-4365-A66E-B84FC18A784D}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{AC7EA575-6F1D-4365-A66E-B84FC18A784D}
- UpgradeCode
- {8D92DEB1-A516-4B03-8731-60974682B69C}
- 安裝資料夾
- %ProgramFiles(x86)%\instedit.com\InstEd
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-insted.ps1
$url = 'https://instedit.github.io/instedit_site/releases2/InstEd-1.5.15.26.msi'
$sha256 = '389BB1B01682BB27BE4666776EEF69EAC3B817AC28907939C5CEEC547D138301'
$file = Join-Path $env:TEMP 'InstEd-1.5.15.26.msi'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process msiexec.exe -ArgumentList '/i', ('"{0}"' -f $file), '/qn', '/norestart' -Wait