Ordres per instal·lar Go Programming Language sense preguntes, desinstal·lar-lo i detectar-lo des d’eines de desplegament. Només es mostra una ordre quan és segura: la que indica el manifest o el valor per defecte documentat de la tecnologia de l’instal·lador.
Guia relacionada: Instal·lació silenciosa: MSI, NSIS, Inno Setup · Desinstal·lar un programa amb el registre o PowerShell
Amb 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 --silentPer instal·lador
64 bits · MSI · Tots els usuaris
Instal·lació silenciosa
msiexec /i go1.27.0.windows-amd64.msi /qn /norestartDesar un registre
msiexec /i go1.27.0.windows-amd64.msi /qn /norestart /l*v "%TEMP%\go-programming-language-install.log"Desinstal·lar
msiexec /x {649B7E21-BFFC-4209-925C-5736BBF28E54} /qn /norestart- Codi de producte MSI
- {649B7E21-BFFC-4209-925C-5736BBF28E54}
- Clau de desinstal·lació al registre
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{649B7E21-BFFC-4209-925C-5736BBF28E54}
- UpgradeCode
- {22EA7650-4AC6-4001-BF29-F4B8775DB1C0}
- Carpeta d’instal·lació
- %ProgramFiles%\Go
ARM64 · MSI · Tots els usuaris
Instal·lació silenciosa
msiexec /i go1.27.0.windows-arm64.msi /qn /norestartDesar un registre
msiexec /i go1.27.0.windows-arm64.msi /qn /norestart /l*v "%TEMP%\go-programming-language-install.log"Desinstal·lar
msiexec /x {0472BCA2-7035-46EA-A36F-EA9B6AEECB31} /qn /norestart- Codi de producte MSI
- {0472BCA2-7035-46EA-A36F-EA9B6AEECB31}
- Clau de desinstal·lació al registre
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{0472BCA2-7035-46EA-A36F-EA9B6AEECB31}
- UpgradeCode
- {21ADE9A3-3FDD-4BA6-BEA6-C85ABADC9488}
- Carpeta d’instal·lació
- %ProgramFiles%\Go
32 bits · MSI · Tots els usuaris
Instal·lació silenciosa
msiexec /i go1.27.0.windows-386.msi /qn /norestartDesar un registre
msiexec /i go1.27.0.windows-386.msi /qn /norestart /l*v "%TEMP%\go-programming-language-install.log"Desinstal·lar
msiexec /x {228A82DF-FA4F-4C68-AFD9-39B8344F1C30} /qn /norestart- Codi de producte MSI
- {228A82DF-FA4F-4C68-AFD9-39B8344F1C30}
- Clau de desinstal·lació al registre
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{228A82DF-FA4F-4C68-AFD9-39B8344F1C30}
- UpgradeCode
- {1C3114EA-08C3-11E1-9095-7FCA4824019B}
- Carpeta d’instal·lació
- %ProgramFiles(x86)%\Go
PowerShell: baixar, verificar, instal·lar
Baixa el fitxer oficial, en comprova l’SHA256 i l’instal·la en mode silenciós.
install-go-programming-language.ps1
$url = 'https://go.dev/dl/go1.27.0.windows-amd64.msi'
$sha256 = '728E9318C061B95082BCF167BAB8B6C6E0D91A045F89F403B3285FA39F0C455B'
$file = Join-Path $env:TEMP 'go1.27.0.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.0.windows-arm64.msi'
$sha256 = '9259168CDA232152F3EF0C51149E842E93E4F67DF84713B55CA31128518E97E3'
$file = Join-Path $env:TEMP 'go1.27.0.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.0.windows-386.msi'
$sha256 = 'A75FE7151E3D9C8C0D43759C92AE320525B49E238510B8FA082B32C1FADFD369'
$file = Join-Path $env:TEMP 'go1.27.0.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