免互動安裝Dais、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id Dais.Dais -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Dais.Dais -e --silentwinget uninstall --id Dais.Dais -e --silent依安裝檔
64位元 · EXE(NSIS) · 僅目前使用者
靜默安裝
Dais_0.16.3_x64-setup.exe /S自訂安裝資料夾
Dais_0.16.3_x64-setup.exe /S /D=C:\Apps\dais- 解除安裝登錄機碼
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Dais
64位元 · MSI · 所有使用者
靜默安裝
msiexec /i Dais_0.16.3_x64_en-US.msi /qn /norestart寫入記錄檔
msiexec /i Dais_0.16.3_x64_en-US.msi /qn /norestart /l*v "%TEMP%\dais-install.log"解除安裝
msiexec /x {E22AB3DB-CF6A-4A47-8DE8-4380051D7F33} /qn /norestart- MSI產品代碼
- {E22AB3DB-CF6A-4A47-8DE8-4380051D7F33}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{E22AB3DB-CF6A-4A47-8DE8-4380051D7F33}
- UpgradeCode
- {4F1EF755-A3C3-5E42-B1C3-DA56D31ED950}
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-dais.ps1
$url = 'https://github.com/Dais-Project/Dais/releases/download/app-v0.16.3/Dais_0.16.3_x64-setup.exe'
$sha256 = '85B7027AC3963E9EF903B4263AF38494041F499F683A604FE191A4DDE28B9009'
$file = Join-Path $env:TEMP 'Dais_0.16.3_x64-setup.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-dais.ps1
$url = 'https://github.com/Dais-Project/Dais/releases/download/app-v0.16.3/Dais_0.16.3_x64_en-US.msi'
$sha256 = '5A59A357D523E97B82028FB51E5C5E078A3ACE021306855B662495CD99EBAE5F'
$file = Join-Path $env:TEMP 'Dais_0.16.3_x64_en-US.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