Go, or Golang, is an open-source programming language focused on simplicity, reliability and efficiency.
The official MSI Go installer for Windows requires admin rights, which are not normally granted on corporate work or school computers.
This post provides a step-by-step guide on how to install Go on Windows without administrator privileges.
Install Go (Golang) on Windows without Admin Rights
- Download a ZIP archive from https://go.dev/dl/:
- Create a folder
%USERPROFILE%\AppData\Local\Programs\GoFrom Command Prompt (CMD) this can be done as follows:
C:\> mkdir %USERPROFILE%\AppData\Local\Programs\Go C:\> cd %USERPROFILE%\AppData\Local\Programs\Go C:\> explorer .
- Extract the ZIP archive with Go into this folder:
C:\> dir %USERPROFILE%\AppData\Local\Programs\Go - sample output - Volume in drive C is Windows Volume Serial Number is AAAA-0000 Directory of C:\Users\%USERNAME%\AppData\Local\Programs\Go 01/04/2024 02:04 PM <DIR> . 01/04/2024 02:02 PM <DIR> .. 01/04/2024 01:53 PM <DIR> api 01/04/2024 01:53 PM <DIR> bin 01/04/2024 01:53 PM 52 codereview.cfg 01/04/2024 01:53 PM 1,337 CONTRIBUTING.md 01/04/2024 01:53 PM <DIR> doc 01/04/2024 01:53 PM 505 go.env 01/04/2024 01:53 PM <DIR> lib 01/04/2024 01:53 PM 1,479 LICENSE 01/04/2024 01:53 PM <DIR> misc 01/04/2024 01:53 PM 1,303 PATENTS 01/04/2024 01:53 PM <DIR> pkg 01/04/2024 01:53 PM 1,455 README.md 01/04/2024 01:53 PM 419 SECURITY.md 01/04/2024 01:58 PM <DIR> src 01/04/2024 02:00 PM <DIR> test 01/04/2024 01:53 PM 35 VERSION 8 File(s) 6,585 bytes 10 Dir(s) 16,855,072,768 bytes free - Start the environment variables editor.
For this – press the ⊞ Win keybutton to open the “Start” menu, type in
enviand click on “Edit environment variables for your account“.It can also be launched with the following command from CMD:
C:\> rundll32 sysdm.cpl,EditEnvironmentVariables
- Add the folder
%USERPROFILE%\AppData\Local\Programs\Go\bintoPATH:
- Create a new environment variable
GOROOTwith the value%USERPROFILE%\AppData\Local\Programs\Go:
To validate the installation, start a new CMD or PowerShell windows and execute:
C:\> go version
- sample output -
go version go1.21.5 windows/amd64
Congratulations! Go has successfully been installed on your Windows machine without admin privileges.
very useful
Great information!!
Thanks, still worked !
thanks for that, works as described.