Page 1 of 1
Re-read system envornment variables
Posted: Mon Jun 20, 2011 1:36 pm
by JMBPHP
Can RT re-read the system (machine) environment variables? I run a SETX script at 12:01AM dialy to create ccyymmdd that is used in various .bat files but RT retains the ccyymmdd value of the last RT start. Seemed odd that %ccyymmdd% displays the old value but if I append the MS dynamic variable %time% it correctly display the current .bat run time.
Re-read system envornment variables
Posted: Mon Jun 20, 2011 5:38 pm
by JMBPHP
Never mind, I configured RT as a service and changed the Windows task scheduler script to stop the service, setx the ccyymmdd environment variable and restart the RT service.
I would think this should do the trick.
Re-read system envornment variables
Posted: Thu Jun 23, 2011 7:15 am
by Oleg
Each application have only copy of environment at starting. If you change some environment variable in other application you should restart the application in order to see the changes.
I think that it is not a very good idea if you want to pass the changes of values instantly. It's better to do this through system registry or some file.
Re-read system envornment variables
Posted: Fri Oct 21, 2011 11:59 pm
by jemesright
Environment variables provide a way to influence the behavior of software on the system. For example, the "LANG" environment variable determines the language in which software programs communicate with the user.Environment variables consist of names that have values assigned to them. For example, on a typical system in the US we would have the value "en_US.UTF-8" assigned to the "LANG" variable.