Kommandon för att installera GLab utan frågor, ta bort programmet igen och identifiera det i distributionsverktyg. Ett kommando visas bara när det är säkert: från manifestet eller som installationsteknikens dokumenterade standard.
Relaterad guide: Parametrar för tyst installation: MSI, NSIS, Inno · Avinstallera program via registret eller PowerShell
Med winget
PowerShell
winget install --id GLab.GLab -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id GLab.GLab -e --silentwinget uninstall --id GLab.GLab -e --silentPer installationsfil
64-bitars · EXE (Inno Setup) · Aktuell användare
Tyst installation
glab_1.133.0_Windows_x86_64_installer.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-Egen mapp
glab_1.133.0_Windows_x86_64_installer.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\glab"- Avinstallationsnyckel i registret
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{679C50AE-F48A-46D1-9493-77F095E9884D}_is1
- Installationsmapp
- %LocalAppData%\Programs\glab
64-bitars · EXE (Inno Setup) · Alla användare
Tyst installation
glab_1.133.0_Windows_x86_64_installer.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-Egen mapp
glab_1.133.0_Windows_x86_64_installer.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\glab"- Avinstallationsnyckel i registret
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{679C50AE-F48A-46D1-9493-77F095E9884D}_is1
- Installationsmapp
- %ProgramFiles%\glab
PowerShell: ladda ner, kontrollera, installera
Laddar ner den officiella filen, kontrollerar dess SHA256 och installerar tyst.
install-glab.ps1
$url = 'https://gitlab.com/gitlab-org/cli/-/releases/v1.133.0/downloads/glab_1.133.0_Windows_x86_64_installer.exe'
$sha256 = '022C5F65679CEA19452578B52847B45C8EB9DC770CC395D5738DD1B9F5E393CD'
$file = Join-Path $env:TEMP 'glab_1.133.0_Windows_x86_64_installer.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 '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait install-glab.ps1
$url = 'https://gitlab.com/gitlab-org/cli/-/releases/v1.133.0/downloads/glab_1.133.0_Windows_x86_64_installer.exe'
$sha256 = '022C5F65679CEA19452578B52847B45C8EB9DC770CC395D5738DD1B9F5E393CD'
$file = Join-Path $env:TEMP 'glab_1.133.0_Windows_x86_64_installer.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 '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait