Does anyone know what system call is used when 2!:5 reads an environment variable on WIndows?
The script 'registry.ijs' contains wrapper verbs for the RegSetValueExA and RegQueryValueExA system DLLs. According to Microsoft (http://support.microsoft.com/kb/q104011/) changes to environment variables made by RegSetValue can be propogated to other running processes by using the SendMessageTimeout with HWND_BROADCAST as one of its parameter values. I have the following three experiences: (1) I can use RegSetValueExA to change a value and verify its new value using RegQueryValueExA. However 2!:5 does not return the new value in this session whether or not I run SendMessageTimeout. (2) SendMessageTimeout does, however, have an effect. If I change a variable using RegSetValue, call SendMessageTimeout and then start a second J session, 2!:5 sees the changed value. (3) When I change a variable and then start a second J session without calling SendMessageTimeout then this new session does not see the changed value. I create the environment registry key required by RegSetValueExA using h =. 1 {:: regcreatekey HKEY_CURRENT_USER;'Environment';3 Any suggestions how I can get a change propogated to an environment variable so that 2!:5 will see it. Thanks David ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
