免互動安裝Rusty、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id hexajohnny.Rusty -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id hexajohnny.Rusty -e --silentwinget uninstall --id hexajohnny.Rusty -e --silent依安裝檔
64位元 · MSI · 所有使用者 · en-US
靜默安裝
msiexec /i Rusty-0.1.8-x64.msi /qn /norestart寫入記錄檔
msiexec /i Rusty-0.1.8-x64.msi /qn /norestart /l*v "%TEMP%\rusty-install.log"解除安裝
msiexec /x {F64D351D-2013-4A36-86D7-757FD3322580} /qn /norestart- MSI產品代碼
- {F64D351D-2013-4A36-86D7-757FD3322580}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{F64D351D-2013-4A36-86D7-757FD3322580}
- UpgradeCode
- {A77A6E2E-8A7F-4C9F-9CF0-9D44E1A44F1A}
- 安裝資料夾
- %ProgramFiles%/Rusty
- DisplayVersion
- 0.1.8
32位元 · EXE(WiX Burn) · 所有使用者
靜默安裝
Rusty-0.1.8-setup.exe /quiet /norestart解除安裝
msiexec /x {AA508D05-87F1-4A03-A657-D82091049655} /qn /norestart- MSI產品代碼
- {AA508D05-87F1-4A03-A657-D82091049655}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{AA508D05-87F1-4A03-A657-D82091049655}
- UpgradeCode
- {B02F4D88-9B36-46D8-9D65-1F8C0F2EA5AB}
32位元 · MSI · 所有使用者 · en-US
靜默安裝
msiexec /i Rusty-0.1.8-x86.msi /qn /norestart寫入記錄檔
msiexec /i Rusty-0.1.8-x86.msi /qn /norestart /l*v "%TEMP%\rusty-install.log"解除安裝
msiexec /x {07FBE073-3A23-4E4B-8784-F95E2F7E91F1} /qn /norestart- MSI產品代碼
- {07FBE073-3A23-4E4B-8784-F95E2F7E91F1}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{07FBE073-3A23-4E4B-8784-F95E2F7E91F1}
- UpgradeCode
- {A77A6E2E-8A7F-4C9F-9CF0-9D44E1A44F1A}
- 安裝資料夾
- %ProgramFiles(x86)%/Rusty
- DisplayVersion
- 0.1.8
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-rusty.ps1
$url = 'https://github.com/hexajohnny/rusty/releases/download/v0.1.8/Rusty-0.1.8-x64.msi'
$sha256 = 'ADBC6653FE8A78B2E127FBDE760817BCF24DBA17B62E2CF3D3AD2ED714B46965'
$file = Join-Path $env:TEMP 'Rusty-0.1.8-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-rusty.ps1
$url = 'https://github.com/hexajohnny/rusty/releases/download/v0.1.8/Rusty-0.1.8-setup.exe'
$sha256 = '06C7ACF4EDBB80CE3EA7EEFF6056F3F2CDE8F9D81F2B67B7A08AB61E28921668'
$file = Join-Path $env:TEMP 'Rusty-0.1.8-setup.exe'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process -FilePath $file -ArgumentList '/quiet /norestart' -Wait install-rusty.ps1
$url = 'https://github.com/hexajohnny/rusty/releases/download/v0.1.8/Rusty-0.1.8-x86.msi'
$sha256 = '58E14B0E63E8CC80B032D53C68C64969065E34793AB9E556269AEE9734F47D8D'
$file = Join-Path $env:TEMP 'Rusty-0.1.8-x86.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