免互動安裝GrappleHook、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id grapplerobotics.GrappleHook -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id grapplerobotics.GrappleHook -e --silentwinget uninstall --id grapplerobotics.GrappleHook -e --silent依安裝檔
64位元 · EXE(NSIS) · 僅目前使用者 · en-US
靜默安裝
GrappleHook_26.0.2_x64-setup.exe /S自訂安裝資料夾
GrappleHook_26.0.2_x64-setup.exe /S /D=C:\Apps\grapplehook- 解除安裝登錄機碼
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\GrappleHook
- 安裝資料夾
- %LocalAppData%\GrappleHook
- DisplayVersion
- 26.0.2
64位元 · MSI · 所有使用者 · en-US
靜默安裝
msiexec /i GrappleHook_26.0.2_x64_en-US.msi /qn /norestart寫入記錄檔
msiexec /i GrappleHook_26.0.2_x64_en-US.msi /qn /norestart /l*v "%TEMP%\grapplehook-install.log"解除安裝
msiexec /x {7CA9AD35-EBBB-4737-82E7-3BD6F75A9251} /qn /norestart- MSI產品代碼
- {7CA9AD35-EBBB-4737-82E7-3BD6F75A9251}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7CA9AD35-EBBB-4737-82E7-3BD6F75A9251}
- UpgradeCode
- {C36B9EB5-8E80-5B90-B092-C22A873C4AC5}
- 安裝資料夾
- %ProgramFiles%/GrappleHook
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-grapplehook.ps1
$url = 'https://github.com/GrappleRobotics/GrappleHook/releases/download/v26.0.2/GrappleHook_26.0.2_x64-setup.exe'
$sha256 = 'B8F6528677B733F79A95204326458768998429B9A14AD4757B05A4BC1F8750E4'
$file = Join-Path $env:TEMP 'GrappleHook_26.0.2_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-grapplehook.ps1
$url = 'https://github.com/GrappleRobotics/GrappleHook/releases/download/v26.0.2/GrappleHook_26.0.2_x64_en-US.msi'
$sha256 = '527FB7CEFB643BE326B9AB020D9C2FEBE8C39B330F45BCA2CACC1F99D9C2FCA4'
$file = Join-Path $env:TEMP 'GrappleHook_26.0.2_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