I am a non administrative user in windows 10 machine. I was trying to set java and gradle path for my account. As a normal user I don't have access to environment variables through control panel. In unix, I can easily change bashrc and set path for my account. In windows I tried to set the variables using setx or set command but these are not persisting for my account.I tried powershell commands also but got access denied error. So, my question is that if I am doing something wrong and if there is a way I can set the path using commands or in windows non admin users can't set path variables permanently.
setx /s machinename /u domain\username PATH "%PATH%;C:\dir1\dir2"
I looked into the other answer which worked for windows 7, but when I tried below command windows 10, nothing happens:
"C:\Windows\system32\rundll32.exe" sysdm.cpl,EditEnvironmentVariables