免互動安裝zyfun、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id HiramWong.zyfun -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id HiramWong.zyfun -e --silentwinget uninstall --id HiramWong.zyfun -e --silent依安裝檔
64位元 · EXE(NSIS) · en-US
靜默安裝
zyfun-win-3.4.7-x64-setup.exe /S自訂安裝資料夾
zyfun-win-3.4.7-x64-setup.exe /S /D=C:\Apps\zyfun- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\1cf4e394-3cb1-57f9-a0e2-d9add46ad139
ARM64 · EXE(NSIS) · en-US
靜默安裝
zyfun-win-3.4.7-arm64-setup.exe /S自訂安裝資料夾
zyfun-win-3.4.7-arm64-setup.exe /S /D=C:\Apps\zyfun- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\1cf4e394-3cb1-57f9-a0e2-d9add46ad139
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-zyfun.ps1
$url = 'https://github.com/Hiram-Wong/zyfun/releases/download/v3.4.7/zyfun-win-3.4.7-x64-setup.exe'
$sha256 = '5147442AEFA27C6300E9CBA7BD03959C49BB9022DFF771A5EB9F8508C19D8D9A'
$file = Join-Path $env:TEMP 'zyfun-win-3.4.7-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-zyfun.ps1
$url = 'https://github.com/Hiram-Wong/zyfun/releases/download/v3.4.7/zyfun-win-3.4.7-arm64-setup.exe'
$sha256 = 'CA61C5BB2124E92205B897DD8592F57D385FA88CCE506565EFEF7316B8E046B7'
$file = Join-Path $env:TEMP 'zyfun-win-3.4.7-arm64-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