免互動安裝Simple DNSCrypt、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id bitbeans.SimpleDNSCrypt -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id bitbeans.SimpleDNSCrypt -e --silentwinget uninstall --id bitbeans.SimpleDNSCrypt -e --silent依安裝檔
64位元 · MSI · 所有使用者 · en-US
靜默安裝
msiexec /i SimpleDNSCrypt64.msi /qn /norestart寫入記錄檔
msiexec /i SimpleDNSCrypt64.msi /qn /norestart /l*v "%TEMP%\simple-dnscrypt-install.log"解除安裝
msiexec /x {F21D078F-4055-462F-A9E9-468A4DE37F06} /qn /norestart- MSI產品代碼
- {F21D078F-4055-462F-A9E9-468A4DE37F06}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{F21D078F-4055-462F-A9E9-468A4DE37F06}
32位元 · MSI · 所有使用者 · en-US
靜默安裝
msiexec /i SimpleDNSCrypt.msi /qn /norestart寫入記錄檔
msiexec /i SimpleDNSCrypt.msi /qn /norestart /l*v "%TEMP%\simple-dnscrypt-install.log"解除安裝
msiexec /x {DC7ADCCF-7167-4524-96AC-9F1FCAD86880} /qn /norestart- MSI產品代碼
- {DC7ADCCF-7167-4524-96AC-9F1FCAD86880}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{DC7ADCCF-7167-4524-96AC-9F1FCAD86880}
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-simple-dnscrypt.ps1
$url = 'https://github.com/bitbeans/SimpleDnsCrypt/releases/download/0.7.1/SimpleDNSCrypt64.msi'
$sha256 = '5BA0C94774ACD7ADE18446B4351E7D28A948C490AEFC50DC6C08C13551F19F7F'
$file = Join-Path $env:TEMP 'SimpleDNSCrypt64.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-simple-dnscrypt.ps1
$url = 'https://github.com/bitbeans/SimpleDnsCrypt/releases/download/0.7.1/SimpleDNSCrypt.msi'
$sha256 = 'CAC6B8119AF3DA70A5977A2E73EE5214303990FEDD7ABBC5F247A1E2CF19A663'
$file = Join-Path $env:TEMP 'SimpleDNSCrypt.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