I use Delphi 10 Seattle on a Windows7 64bit machine.
Here is the problem:
In order to create a test environment for my software, I created a little application that adds environment variables into the Windows registry under
HKEY_CURRENT_USER\Environment
I use these variables in the search paths of my packages and the main project, in order to be able to also commit project settings into source control and to easily switch from production to test branches etc ...
Now, the problem is, that after creating the environment variable, Delphi does not update its "internal System Variable store" under
Tools --> Options --> Environment Variables
and the project does not compile.
Even restarting Delphi did not bring the desired effect. I had to reboot Windows completely, in order to make it work.
is there a way to update the System Variables in Delphi within my application? Am I missing something else?
Thanks a lot!
SetEnvironmentVariable()
but this only sets the variable at runtime for the running process. What I need is a true system variable which lives on after I created it. – rocksteady