免互動安裝IdFix、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id Microsoft.IdFix -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Microsoft.IdFix -e --silentwinget uninstall --id Microsoft.IdFix -e --silent依安裝檔
64位元 · MSI · 所有使用者 · en-US
靜默安裝
msiexec /i IdFix.Setup.2.6.0.3.msi /qn /norestart寫入記錄檔
msiexec /i IdFix.Setup.2.6.0.3.msi /qn /norestart /l*v "%TEMP%\idfix-install.log"解除安裝
msiexec /x {6C673EDA-F963-40DA-8347-5C019F290BAF} /qn /norestart- MSI產品代碼
- {6C673EDA-F963-40DA-8347-5C019F290BAF}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{6C673EDA-F963-40DA-8347-5C019F290BAF}
- UpgradeCode
- {81F4A0E0-BE55-4D44-B07C-ED11ABDB6E36}
- 安裝資料夾
- %ProgramFiles%\Microsoft FastTrack Open Source\Microsoft IdFix
- DisplayVersion
- 1.0.0.0
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-idfix.ps1
$url = 'https://github.com/microsoft/idfix/raw/refs/heads/master/MSIs/IdFix.Setup.2.6.0.3.msi'
$sha256 = 'F5B3103A87104E22AC13F7F393C4C642D6756F9B2A4D035CB6BB7A2B78C98784'
$file = Join-Path $env:TEMP 'IdFix.Setup.2.6.0.3.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