免互動安裝ILSpy、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id icsharpcode.ILSpy.Preview -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id icsharpcode.ILSpy.Preview -e --silentwinget uninstall --id icsharpcode.ILSpy.Preview -e --silent依安裝檔
64位元 · MSI
靜默安裝
msiexec /i ILSpy_Installer_11.0.0.9223-preview1-x64.msi /qn /norestart寫入記錄檔
msiexec /i ILSpy_Installer_11.0.0.9223-preview1-x64.msi /qn /norestart /l*v "%TEMP%\ilspy-icsharpcode-team-install.log"解除安裝
msiexec /x {A12FDAB1-731B-4A98-9749-D4817E8696B3} /qn /norestart- MSI產品代碼
- {A12FDAB1-731B-4A98-9749-D4817E8696B3}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A12FDAB1-731B-4A98-9749-D4817E8696B3}
- UpgradeCode
- {A12FDAB1-731B-4A98-9749-D481CE8692AB}
- 安裝資料夾
- %LocalAppData%/Programs/ILSpy
- DisplayVersion
- 11.0.0.9223
ARM64 · MSI
靜默安裝
msiexec /i ILSpy_Installer_11.0.0.9223-preview1-arm64.msi /qn /norestart寫入記錄檔
msiexec /i ILSpy_Installer_11.0.0.9223-preview1-arm64.msi /qn /norestart /l*v "%TEMP%\ilspy-icsharpcode-team-install.log"解除安裝
msiexec /x {A12FDAB1-731B-4A98-9749-D4817E8696B3} /qn /norestart- MSI產品代碼
- {A12FDAB1-731B-4A98-9749-D4817E8696B3}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A12FDAB1-731B-4A98-9749-D4817E8696B3}
- UpgradeCode
- {A12FDAB1-731B-4A98-9749-D481CE8692AB}
- 安裝資料夾
- %LocalAppData%/Programs/ILSpy
- DisplayVersion
- 11.0.0.9223
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-ilspy-icsharpcode-team.ps1
$url = 'https://github.com/icsharpcode/ILSpy/releases/download/v11.0-preview1/ILSpy_Installer_11.0.0.9223-preview1-x64.msi'
$sha256 = '46293E26D13A5405BFE1B16E06965DB5A0F3CBFDBFE017DE25DDDF5E145153B6'
$file = Join-Path $env:TEMP 'ILSpy_Installer_11.0.0.9223-preview1-x64.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 install-ilspy-icsharpcode-team.ps1
$url = 'https://github.com/icsharpcode/ILSpy/releases/download/v11.0-preview1/ILSpy_Installer_11.0.0.9223-preview1-arm64.msi'
$sha256 = 'AE926A0992E217F585A48E2D2EA99F636AF56ED7BD9ADDDA4941A95A8CFAED55'
$file = Join-Path $env:TEMP 'ILSpy_Installer_11.0.0.9223-preview1-arm64.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