免互動安裝cloudflared、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id Cloudflare.cloudflared -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Cloudflare.cloudflared -e --silentwinget uninstall --id Cloudflare.cloudflared -e --silent依安裝檔
64位元 · 免安裝版
免安裝(可攜版)
64位元 · MSI · 所有使用者
靜默安裝
msiexec /i cloudflared-windows-amd64.msi /qn /norestart寫入記錄檔
msiexec /i cloudflared-windows-amd64.msi /qn /norestart /l*v "%TEMP%\cloudflared-install.log"解除安裝
msiexec /x {59387E81-7AC3-4769-BCA9-85E8C24A5FFE} /qn /norestart- MSI產品代碼
- {59387E81-7AC3-4769-BCA9-85E8C24A5FFE}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{59387E81-7AC3-4769-BCA9-85E8C24A5FFE}
- UpgradeCode
- {23f90fdd-9328-47ea-ab52-5380855a4b12}
- 安裝資料夾
- %ProgramFiles(x86)%\cloudflared
32位元 · 免安裝版
免安裝(可攜版)
32位元 · MSI · 所有使用者
靜默安裝
msiexec /i cloudflared-windows-386.msi /qn /norestart寫入記錄檔
msiexec /i cloudflared-windows-386.msi /qn /norestart /l*v "%TEMP%\cloudflared-install.log"解除安裝
msiexec /x {B80985E8-0087-4A33-92E1-101ED770C2A2} /qn /norestart- MSI產品代碼
- {B80985E8-0087-4A33-92E1-101ED770C2A2}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{B80985E8-0087-4A33-92E1-101ED770C2A2}
- UpgradeCode
- {23f90fdd-9328-47ea-ab52-5380855a4b12}
- 安裝資料夾
- %ProgramFiles(x86)%\cloudflared
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-cloudflared.ps1
$url = 'https://github.com/cloudflare/cloudflared/releases/download/2026.10.4/cloudflared-windows-amd64.msi'
$sha256 = '6D5BD5310304DFBED4263C81FCF3EB6E69DCACE2B2F86E960032C9F1F46532BF'
$file = Join-Path $env:TEMP 'cloudflared-windows-amd64.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-cloudflared.ps1
$url = 'https://github.com/cloudflare/cloudflared/releases/download/2026.10.4/cloudflared-windows-386.msi'
$sha256 = '26E1680DB8AEEC2A203769C11201AE8E0FAD7DAF156B1D712B3A36F70C8BA73A'
$file = Join-Path $env:TEMP 'cloudflared-windows-386.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