免互動安裝Gitnado、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id hegsie.Gitnado -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id hegsie.Gitnado -e --silentwinget uninstall --id hegsie.Gitnado -e --silent依安裝檔
64位元 · EXE(NSIS) · 僅目前使用者 · en-US
靜默安裝
Gitnado_0.9.1_x64-setup.exe /S自訂安裝資料夾
Gitnado_0.9.1_x64-setup.exe /S /D=C:\Apps\gitnado- 解除安裝登錄機碼
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Gitnado
- 安裝資料夾
- %LocalAppData%\Gitnado
64位元 · MSI · 所有使用者 · en-US
靜默安裝
msiexec /i Gitnado_0.9.1_x64_en-US.msi /qn /norestart寫入記錄檔
msiexec /i Gitnado_0.9.1_x64_en-US.msi /qn /norestart /l*v "%TEMP%\gitnado-install.log"解除安裝
msiexec /x {6117787E-D2B2-4488-96D0-88463BBA10E7} /qn /norestart- MSI產品代碼
- {6117787E-D2B2-4488-96D0-88463BBA10E7}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{6117787E-D2B2-4488-96D0-88463BBA10E7}
- UpgradeCode
- {84C95AFF-09D5-5959-BE4D-927B1CC7FC1B}
- 安裝資料夾
- %ProgramFiles%\Gitnado
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-gitnado.ps1
$url = 'https://github.com/hegsie/gitnado/releases/download/v0.9.1/Gitnado_0.9.1_x64-setup.exe'
$sha256 = '386FE0A6279BB83B62328B07256D212FD6AA4F04C743DB49F55DF9383D0C9C79'
$file = Join-Path $env:TEMP 'Gitnado_0.9.1_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-gitnado.ps1
$url = 'https://github.com/hegsie/gitnado/releases/download/v0.9.1/Gitnado_0.9.1_x64_en-US.msi'
$sha256 = 'F55072BA95639235E3D63CB75E4614115C3D159C2E5E5C389D12AA81AF8D9C6D'
$file = Join-Path $env:TEMP 'Gitnado_0.9.1_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