Polecenia do instalacji programu Go Programming Language bez pytań, do jego usuwania i do wykrywania w narzędziach wdrożeniowych. Polecenie jest podane tylko wtedy, gdy jest pewne: pochodzi z manifestu albo z udokumentowanych ustawień domyślnych technologii instalatora.
Powiązany poradnik: Parametry cichej instalacji: MSI, NSIS, Inno Setup · Odinstalowanie programu przez rejestr lub PowerShell
Przez winget
PowerShell
winget install --id GoLang.Go -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id GoLang.Go -e --silentwinget uninstall --id GoLang.Go -e --silentWedług instalatora
64-bit · MSI · Wszyscy użytkownicy
Cicha instalacja
msiexec /i go1.27.4.windows-amd64.msi /qn /norestartZapis dziennika
msiexec /i go1.27.4.windows-amd64.msi /qn /norestart /l*v "%TEMP%\go-programming-language-install.log"Odinstalowanie
msiexec /x {9FEBB373-7C3F-4693-A296-BEBB83EDF4A4} /qn /norestart- Kod produktu MSI
- {9FEBB373-7C3F-4693-A296-BEBB83EDF4A4}
- Klucz odinstalowania w rejestrze
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{9FEBB373-7C3F-4693-A296-BEBB83EDF4A4}
- UpgradeCode
- {22EA7650-4AC6-4001-BF29-F4B8775DB1C0}
- Folder instalacji
- %ProgramFiles%\Go
ARM64 · MSI · Wszyscy użytkownicy
Cicha instalacja
msiexec /i go1.27.4.windows-arm64.msi /qn /norestartZapis dziennika
msiexec /i go1.27.4.windows-arm64.msi /qn /norestart /l*v "%TEMP%\go-programming-language-install.log"Odinstalowanie
msiexec /x {EF3D7450-92E4-443A-98A1-8C7F297460C5} /qn /norestart- Kod produktu MSI
- {EF3D7450-92E4-443A-98A1-8C7F297460C5}
- Klucz odinstalowania w rejestrze
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{EF3D7450-92E4-443A-98A1-8C7F297460C5}
- UpgradeCode
- {21ADE9A3-3FDD-4BA6-BEA6-C85ABADC9488}
- Folder instalacji
- %ProgramFiles%\Go
32-bit · MSI · Wszyscy użytkownicy
Cicha instalacja
msiexec /i go1.27.4.windows-386.msi /qn /norestartZapis dziennika
msiexec /i go1.27.4.windows-386.msi /qn /norestart /l*v "%TEMP%\go-programming-language-install.log"Odinstalowanie
msiexec /x {E78BD0F1-419E-451B-A3A1-DC2E6344EBCE} /qn /norestart- Kod produktu MSI
- {E78BD0F1-419E-451B-A3A1-DC2E6344EBCE}
- Klucz odinstalowania w rejestrze
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{E78BD0F1-419E-451B-A3A1-DC2E6344EBCE}
- UpgradeCode
- {1C3114EA-08C3-11E1-9095-7FCA4824019B}
- Folder instalacji
- %ProgramFiles(x86)%\Go
PowerShell: pobierz, zweryfikuj, zainstaluj
Pobiera oficjalny plik, sprawdza jego SHA256 i instaluje go po cichu.
install-go-programming-language.ps1
$url = 'https://go.dev/dl/go1.27.4.windows-amd64.msi'
$sha256 = 'AE9E383A027AC83C227EFD0BE3173BF98BCCFA5D966A206DFF7998F4A3D8449C'
$file = Join-Path $env:TEMP 'go1.27.4.windows-amd64.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 install-go-programming-language.ps1
$url = 'https://go.dev/dl/go1.27.4.windows-arm64.msi'
$sha256 = '1C265543D177C5415C13B77D46A827A86247E6F9854265E04D528F1C7BFFD634'
$file = Join-Path $env:TEMP 'go1.27.4.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' -Wait install-go-programming-language.ps1
$url = 'https://go.dev/dl/go1.27.4.windows-386.msi'
$sha256 = 'D70F0C99C86FF5246B267738BBEBEE8FAA3A448DD86643C3C1D76A98515DE95D'
$file = Join-Path $env:TEMP 'go1.27.4.windows-386.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