免互動安裝GGCode Desktop、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id gg.ai.ggcode-desktop -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id gg.ai.ggcode-desktop -e --silentwinget uninstall --id gg.ai.ggcode-desktop -e --silent依安裝檔
64位元 · MSI · 僅目前使用者
靜默安裝
msiexec /i ggcode-desktop_1.3.267_windows_x64.msi /qn /norestart /qn寫入記錄檔
msiexec /i ggcode-desktop_1.3.267_windows_x64.msi /qn /norestart /qn /l*v "%TEMP%\ggcode-desktop-install.log"解除安裝
msiexec /x {D42A90F0-DB9D-4DB1-9AB3-0E98CADB70BD} /qn /norestart- MSI產品代碼
- {D42A90F0-DB9D-4DB1-9AB3-0E98CADB70BD}
- 解除安裝登錄機碼
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{D42A90F0-DB9D-4DB1-9AB3-0E98CADB70BD}
- UpgradeCode
- {D4E5F6A7-B8C9-0123-CDEF-345678901234}
ARM64 · MSI · 僅目前使用者
靜默安裝
msiexec /i ggcode-desktop_1.3.267_windows_arm64.msi /qn /norestart /qn寫入記錄檔
msiexec /i ggcode-desktop_1.3.267_windows_arm64.msi /qn /norestart /qn /l*v "%TEMP%\ggcode-desktop-install.log"解除安裝
msiexec /x {8BCABE40-542E-4110-B44D-3EE770D9BB6B} /qn /norestart- MSI產品代碼
- {8BCABE40-542E-4110-B44D-3EE770D9BB6B}
- 解除安裝登錄機碼
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{8BCABE40-542E-4110-B44D-3EE770D9BB6B}
- UpgradeCode
- {D4E5F6A7-B8C9-0123-CDEF-345678901234}
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-ggcode-desktop.ps1
$url = 'https://github.com/topcheer/ggcode/releases/download/v1.3.267/ggcode-desktop_1.3.267_windows_x64.msi'
$sha256 = 'FCAA6086812B887A87A70403769B7122573AE4EF80EDCF822C747849228A345A'
$file = Join-Path $env:TEMP 'ggcode-desktop_1.3.267_windows_x64.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', '/qn' -Wait install-ggcode-desktop.ps1
$url = 'https://github.com/topcheer/ggcode/releases/download/v1.3.267/ggcode-desktop_1.3.267_windows_arm64.msi'
$sha256 = '2F4089C55041B80F9D82EBAD63C0D569B704A13922657F1ED545A1A406D4675B'
$file = Join-Path $env:TEMP 'ggcode-desktop_1.3.267_windows_arm64.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', '/qn' -Wait