I Cannot Add an Environment Variable on Windows

I want to add an environment variable using setx command. I used this syntax.

setx /M path "%Path%;C:\Program Files\Android\android-sdk\platform-tools"

After i enter this, this error happen.

access to registry path is denied.

How do i fix this error?

2

1 Answer

You must be an a Administrator in order to do this - Ramhound

I post as an answer myself. In order to do add an environment variable, I have to log in as Administrator.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.

Share this article
Twitter Facebook Pinterest