免互動安裝UVtools、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id PTRTECH.UVtools -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id PTRTECH.UVtools -e --silentwinget uninstall --id PTRTECH.UVtools -e --silent依安裝檔
64位元 · MSI · 所有使用者 · en-US
靜默安裝
msiexec /i UVtools_win-x64_v7.1.2.msi /qn /norestart /qn寫入記錄檔
msiexec /i UVtools_win-x64_v7.1.2.msi /qn /norestart /qn /l*v "%TEMP%\uvtools-install.log"解除安裝
msiexec /x {D59A099C-F9F8-46E4-8FE4-F2A6758EA78C} /qn /norestart- MSI產品代碼
- {D59A099C-F9F8-46E4-8FE4-F2A6758EA78C}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{D59A099C-F9F8-46E4-8FE4-F2A6758EA78C}
- UpgradeCode
- {1EA6D212-15C0-425E-B2EC-4B6C60817552}
- 安裝資料夾
- %ProgramFiles%\UVtools
- DisplayVersion
- 7.1.2
ARM64 · MSI · 所有使用者 · en-US
靜默安裝
msiexec /i UVtools_win-arm64_v7.1.2.msi /qn /norestart /qn寫入記錄檔
msiexec /i UVtools_win-arm64_v7.1.2.msi /qn /norestart /qn /l*v "%TEMP%\uvtools-install.log"解除安裝
msiexec /x {086FFBC5-4304-414F-9492-33F6B82E1086} /qn /norestart- MSI產品代碼
- {086FFBC5-4304-414F-9492-33F6B82E1086}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{086FFBC5-4304-414F-9492-33F6B82E1086}
- UpgradeCode
- {E7182630-416D-47FF-80C8-26586FD4C142}
- 安裝資料夾
- %ProgramFiles%\UVtools
- DisplayVersion
- 7.1.2
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-uvtools.ps1
$url = 'https://github.com/sn4k3/UVtools/releases/download/v7.1.2/UVtools_win-x64_v7.1.2.msi'
$sha256 = '4041374926DA02BB99395B090CC21B9C4C23041EE04F8DD936F90BA25DF38056'
$file = Join-Path $env:TEMP 'UVtools_win-x64_v7.1.2.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', '/qn' -Wait install-uvtools.ps1
$url = 'https://github.com/sn4k3/UVtools/releases/download/v7.1.2/UVtools_win-arm64_v7.1.2.msi'
$sha256 = '8FDEDBC80840697EBD57E95330F1D938C3DCD886841E86636AD17695EBA37CD3'
$file = Join-Path $env:TEMP 'UVtools_win-arm64_v7.1.2.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', '/qn' -Wait