Windows 11 cannot use "cd"command after setting system variables

Coia Prant 1 Reputation point
2022-11-21T15:03:12.883+00:00

As the title, I have edited the windows system variables, but the error still occurs when I cd
262600-image.png

262726-image.png

262741-image.png

262751-image.png

As shown in the figure below, an error is reported after using the "set" command
262667-image.png

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,151 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Philippe Levesque 5,681 Reputation points MVP
    2022-11-21T15:42:13.26+00:00

    Hi

    Did you run cmd as admin ? as the variable seem to not set itself.

    In the first printscreen I see an error in gopath, it finish with a ;

    If you try cd %GOROOT%, or any other, does it work ? I ask as other directory seem ok without the ;

    I would advise to run cmd as an admin and set the correct system variable correctly, not user's one.