subzero349
Technical User
Hello,
I have code that will read a registry entry and write a registry entry. I use this code to read in the PATH registry entry and write some new paths to it. I am modifying the following registry entry:
"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\"
Like I said, I can add: "c:\directory\" to the path no problem, but It actually doesn't work (when I try and run an .exe from the command prompt) until I preform a restart. I cannot afford a restart.
I'm using Windows 2000 - if you right click on "my computer" and then click the "advanced" tab, and then click the "environment variables" tab and navigate to the "PATH" and make an addition there - and click ok, ok, the change happens immediately - NO restart required... I would like to do this using delphi... I have found ways to do this for the desktop wallpaper change immediatly, but not the PATH.
Any help would be greatly appreciated.
PS - When I run my delphi program the way it is now, I can than open up the "environment variables" dialog from the system properties box and I can find that the change is there... but I still have to click ok, ok, for it to work it's magic and actually register the change...
I have code that will read a registry entry and write a registry entry. I use this code to read in the PATH registry entry and write some new paths to it. I am modifying the following registry entry:
"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\"
Like I said, I can add: "c:\directory\" to the path no problem, but It actually doesn't work (when I try and run an .exe from the command prompt) until I preform a restart. I cannot afford a restart.
I'm using Windows 2000 - if you right click on "my computer" and then click the "advanced" tab, and then click the "environment variables" tab and navigate to the "PATH" and make an addition there - and click ok, ok, the change happens immediately - NO restart required... I would like to do this using delphi... I have found ways to do this for the desktop wallpaper change immediatly, but not the PATH.
Any help would be greatly appreciated.
PS - When I run my delphi program the way it is now, I can than open up the "environment variables" dialog from the system properties box and I can find that the change is there... but I still have to click ok, ok, for it to work it's magic and actually register the change...