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 for business Windows Client for IT Pros User experience Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Philippe Levesque 5,836 Reputation points
    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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.