I have been using this function without a problem for a few months on my users... Is it really not changing the Environment variable, or is it not changing it for a console window that you have open? What I mean is that I have noticed that if I have a console window open when I use Win32::AdminMisc::SetEnvVar(), I have to set the environment variable for the window separately, but all other non-console windows use the new environment. I set it by setting the appropriate key in the %ENV hash. For example, "$ENV{'TIA'} = 865";
-----Original Message----- From: Dean Theophilou [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 13, 2001 12:13 PM To: Beginners-Cgi@Perl. Org; Perl-Win32-Admin@ActiveState. com Subject: AdminMisc::SetEnvVar Hello: I wrote a script that modifies an environment variable during logon with the Wi32::AdminMisc::SetEnvVar function. Although the function sets the environment variable as expected, the change does not take effect until one of two things happen: 1) The user logs off and then back on; 2) The user goes to the System applet->Environment tab and then clicks "Ok" (note that I don't have to do anything in the Environment tab; I only have to click on "OK"). So, my question is: why is this happening? Did I do something wrong. Am I using the wrong function. Is there some way to emulate the clicking of the "Ok" button in the Environment tab? Thank you. Dean Theophilou Genisar _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin -------------------------------------------------------------------------------- This email may contain confidential and privileged material for the sole use of the intended recipient. If you are not the intended recipient, please contact the sender and delete all copies. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]