Install Go (Golang) on Windows without Admin Rights

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

  1. Download a ZIP archive from https://go.dev/dl/:
  2. Create a folder %USERPROFILE%\AppData\Local\Programs\Go

    From 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 .
  3. 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
    
  4. Start the environment variables editor.

    For this – press the ⊞ Win keybutton to open the “Start” menu, type in envi and click on “Edit environment variables for your account.

    It can also be launched with the following command from CMD:

    C:\> rundll32 sysdm.cpl,EditEnvironmentVariables
  5. Add the folder %USERPROFILE%\AppData\Local\Programs\Go\bin to PATH:
  6. Create a new environment variable GOROOT with 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.

Was it useful? Share this post with the world!

4 Replies to “Install Go (Golang) on Windows without Admin Rights”

  1. very useful

  2. Great information!!

  3. Thanks, still worked !

  4. thanks for that, works as described.

Leave a Reply