免互動安裝C Shell for Windows、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id Tropibyte.cshw -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Tropibyte.cshw -e --silentwinget uninstall --id Tropibyte.cshw -e --silent依安裝檔
64位元 · EXE(Inno Setup) · 所有使用者
靜默安裝
cshw-setup-1.0.8.4.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-自訂安裝資料夾
cshw-setup-1.0.8.4.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\c-shell-for-windows"- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{CFE685C6-DC75-4996-AC4B-7BE4F4D5BCB6}_is1
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-c-shell-for-windows.ps1
$url = 'https://github.com/tropibyte/cshw-releases/releases/download/v1.0.8.4/cshw-setup-1.0.8.4.exe'
$sha256 = '0F1582CF9A787E06D572BA05353C0BB755812547F5F570F12CE5A70CE33010E3'
$file = Join-Path $env:TEMP 'cshw-setup-1.0.8.4.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 '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait