免互動安裝JPEGView、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id sylikc.JPEGView -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id sylikc.JPEGView -e --silentwinget uninstall --id sylikc.JPEGView -e --silent依安裝檔
64位元 · MSI · 所有使用者
靜默安裝
msiexec /i JPEGView64_en-us_1.3.46.msi /qn /norestart寫入記錄檔
msiexec /i JPEGView64_en-us_1.3.46.msi /qn /norestart /l*v "%TEMP%\jpegview-install.log"解除安裝
msiexec /x {9B512822-E3B5-4D72-8CE2-61544D75463C} /qn /norestart- MSI產品代碼
- {9B512822-E3B5-4D72-8CE2-61544D75463C}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{9B512822-E3B5-4D72-8CE2-61544D75463C}
- UpgradeCode
- {CC010056-8703-4EC9-A56E-7CB52641D6F4}
32位元 · MSI · 所有使用者
靜默安裝
msiexec /i JPEGView32_en-us_1.3.46.msi /qn /norestart寫入記錄檔
msiexec /i JPEGView32_en-us_1.3.46.msi /qn /norestart /l*v "%TEMP%\jpegview-install.log"解除安裝
msiexec /x {8C6FBD31-4EF3-44E7-B3C7-5069A74E144D} /qn /norestart- MSI產品代碼
- {8C6FBD31-4EF3-44E7-B3C7-5069A74E144D}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{8C6FBD31-4EF3-44E7-B3C7-5069A74E144D}
- UpgradeCode
- {CC010056-8703-4EC9-A56E-7CB52641D6F4}
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-jpegview.ps1
$url = 'https://github.com/sylikc/jpegview/releases/download/v1.3.46/JPEGView64_en-us_1.3.46.msi'
$sha256 = '3108A85B5D408FA17027B25454F0EE7E7B450E680DBC1DAB68D26D9099E18BF2'
$file = Join-Path $env:TEMP 'JPEGView64_en-us_1.3.46.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-jpegview.ps1
$url = 'https://github.com/sylikc/jpegview/releases/download/v1.3.46/JPEGView32_en-us_1.3.46.msi'
$sha256 = '842A864AD7F26054AA86AED556A56EEA129A1F9D958E6F96E983DF899A2D1A9A'
$file = Join-Path $env:TEMP 'JPEGView32_en-us_1.3.46.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