免互動安裝PuTTY、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id PuTTY.PuTTY -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id PuTTY.PuTTY -e --silentwinget uninstall --id PuTTY.PuTTY -e --silent依安裝檔
64位元 · MSI · 所有使用者
靜默安裝
msiexec /i putty-64bit-0.85-installer.msi /qn /norestart寫入記錄檔
msiexec /i putty-64bit-0.85-installer.msi /qn /norestart /l*v "%TEMP%\putty-install.log"解除安裝
msiexec /x {3B0346D3-155D-43E5-9561-B9BE51CF2EB6} /qn /norestart- MSI產品代碼
- {3B0346D3-155D-43E5-9561-B9BE51CF2EB6}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{3B0346D3-155D-43E5-9561-B9BE51CF2EB6}
- UpgradeCode
- {C9EAA861-2B72-4FAF-9FEE-EEB1AD5FD15E}
64位元 · ZIP
免安裝(可攜版)
ARM64 · MSI · 所有使用者
靜默安裝
msiexec /i putty-arm64-0.85-installer.msi /qn /norestart寫入記錄檔
msiexec /i putty-arm64-0.85-installer.msi /qn /norestart /l*v "%TEMP%\putty-install.log"解除安裝
msiexec /x {B9D99033-2B04-4C26-8751-DD51F2D9A2C1} /qn /norestart- MSI產品代碼
- {B9D99033-2B04-4C26-8751-DD51F2D9A2C1}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{B9D99033-2B04-4C26-8751-DD51F2D9A2C1}
- UpgradeCode
- {2125AD39-A960-4377-AD41-99E50D842AE5}
ARM64 · ZIP
免安裝(可攜版)
32位元 · MSI · 所有使用者
靜默安裝
msiexec /i putty-0.85-installer.msi /qn /norestart寫入記錄檔
msiexec /i putty-0.85-installer.msi /qn /norestart /l*v "%TEMP%\putty-install.log"解除安裝
msiexec /x {057E0E80-E4D6-4541-9E00-5FE18954C4D5} /qn /norestart- MSI產品代碼
- {057E0E80-E4D6-4541-9E00-5FE18954C4D5}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{057E0E80-E4D6-4541-9E00-5FE18954C4D5}
- UpgradeCode
- {DCE70C63-8808-4646-B16B-A677BD298385}
32位元 · ZIP
免安裝(可攜版)
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-putty.ps1
$url = 'https://the.earth.li/~sgtatham/putty/0.85/w64/putty-64bit-0.85-installer.msi'
$sha256 = '2213EBACF962B709411D654A40087508A694756BC4E41C5A1C24AD86596B2511'
$file = Join-Path $env:TEMP 'putty-64bit-0.85-installer.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-putty.ps1
$url = 'https://the.earth.li/~sgtatham/putty/0.85/wa64/putty-arm64-0.85-installer.msi'
$sha256 = 'F26059B6F6CFA7BADD59A1F133AF4338AD3EC68E8B0AEB0EC1DFD7D63E1C66D4'
$file = Join-Path $env:TEMP 'putty-arm64-0.85-installer.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-putty.ps1
$url = 'https://the.earth.li/~sgtatham/putty/0.85/w32/putty-0.85-installer.msi'
$sha256 = 'CBC48AF94F6462FA3C1859F4185A1FFDA360C3C760DEF9AD5B1E0EC1430B2E09'
$file = Join-Path $env:TEMP 'putty-0.85-installer.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