免互動安裝NextDNS、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id NextDNS.NextDNS -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id NextDNS.NextDNS -e --silentwinget uninstall --id NextDNS.NextDNS -e --silent依安裝檔
32位元 · EXE(NSIS) · 所有使用者
靜默安裝
NextDNSSetup-3.0.13.exe /S自訂安裝資料夾
NextDNSSetup-3.0.13.exe /S /D=C:\Apps\nextdns- 解除安裝登錄機碼
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\NextDNS
32位元 · MSI
靜默安裝
msiexec /i NextDNSSetup-3.0.13.msi /qn /norestart寫入記錄檔
msiexec /i NextDNSSetup-3.0.13.msi /qn /norestart /l*v "%TEMP%\nextdns-install.log"PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-nextdns.ps1
$url = 'https://storage.googleapis.com/nextdns_windows/NextDNSSetup-3.0.13.exe'
$sha256 = '1C7ED1124A0EE7E955AB0B1C1C27C6AB09EA9B644258CC5801622ED0E5ECE33A'
$file = Join-Path $env:TEMP 'NextDNSSetup-3.0.13.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 '/S' -Wait install-nextdns.ps1
$url = 'https://storage.googleapis.com/nextdns_windows/NextDNSSetup-3.0.13.msi'
$sha256 = '7B28FC6F45A2D9856706ACA16A33D95BA87E4E628EE1C93F165BDEC1C36D61BB'
$file = Join-Path $env:TEMP 'NextDNSSetup-3.0.13.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