免互動安裝imhex、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id WerWolv.ImHex -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id WerWolv.ImHex -e --silentwinget uninstall --id WerWolv.ImHex -e --silent依安裝檔
64位元 · MSI · 所有使用者 · en-US
靜默安裝
msiexec /i imhex-1.38.1-Windows-x86_64.msi /qn /norestart寫入記錄檔
msiexec /i imhex-1.38.1-Windows-x86_64.msi /qn /norestart /l*v "%TEMP%\imhex-install.log"解除安裝
msiexec /x {CE1B4089-0323-4708-BE11-22B28ACF9EA9} /qn /norestart- MSI產品代碼
- {CE1B4089-0323-4708-BE11-22B28ACF9EA9}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{CE1B4089-0323-4708-BE11-22B28ACF9EA9}
- UpgradeCode
- {05000E99-9659-42FD-A1CF-05C554B39285}
ARM64 · MSI · 所有使用者 · en-US
靜默安裝
msiexec /i imhex-1.38.1-Windows-arm64.msi /qn /norestart寫入記錄檔
msiexec /i imhex-1.38.1-Windows-arm64.msi /qn /norestart /l*v "%TEMP%\imhex-install.log"解除安裝
msiexec /x {0ABF7D14-EEDC-4ADB-BC5F-0C375BFEEFA6} /qn /norestart- MSI產品代碼
- {0ABF7D14-EEDC-4ADB-BC5F-0C375BFEEFA6}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{0ABF7D14-EEDC-4ADB-BC5F-0C375BFEEFA6}
- UpgradeCode
- {05000E99-9659-42FD-A1CF-05C554B39285}
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-imhex.ps1
$url = 'https://github.com/WerWolv/ImHex/releases/download/v1.38.1/imhex-1.38.1-Windows-x86_64.msi'
$sha256 = 'F0BE16446F546ADE94E55C3626A67C831CC85C03965A9C12BACF0C076214851C'
$file = Join-Path $env:TEMP 'imhex-1.38.1-Windows-x86_64.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-imhex.ps1
$url = 'https://github.com/WerWolv/ImHex/releases/download/v1.38.1/imhex-1.38.1-Windows-arm64.msi'
$sha256 = 'AA046F974408FDE3FF6A698C4D524B4659F5FACAC3AFE696891D279BD49606D0'
$file = Join-Path $env:TEMP 'imhex-1.38.1-Windows-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