Answer the question
In order to leave comments, you need to log in
Where are user environment variables stored?
Hey!
Such a thing. I wanted to write a small utility to add a directory to the PATH variable. I found where variables are stored in the registry, but only system ones.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
, HKEY_USERS\S-1-5-21-341354423-1384976903-1200731615-1000\Environment
, S-1-5-21-341354423-1384976903-1200731615-1000is generated automatically, and if it is written in the code, then it will not work on another computer.
Answer the question
In order to leave comments, you need to log in
HKCU\Environment than does not suit? this is just the user who is currently logged in
There is a SetEnvironmentVariable function that should change user variables. You don't need to know where they are stored.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question