Mine always contains LOGONSERVER (which appears in CMD shells, but not in
the ControlPanel System applet). I can add variables there with my
home-spun SETENV.EXE, but they're never propagated even though SETENV uses
the recommended SendMessageTimeout( ... "Environment") (which does propagate
changes to the "usual" system and user environments).
Is there a way to propagate changes to this environment? It could be useful
since these variables (presumably) don't survive logouts and reboots.
Thanks.
- Vince
___
Vincent Fatica
Syracuse University Mathematics
vefa...@syr.edu
http://barnyard.syr.edu/~vefatica/
The way I understand it, it is to be used by logon scripts and then
discarded. I could be guilty of misunderstanding, however. I suggest you
read the knowledge base article Q183495 on the MSDN-CD or at
http://www.microsoft.com/kb
Regards,
Will
As I said, I might be all wet. But I think the article is a Clintonesque way
of admitting (but not really) to a bug. I think it tries to say that a login
script that sets environment variables will set them here and that they are
deleted after the script runs. However, in the case where there is no script
to run, the one created automatically doesn't get deleted. But it ain't
really a bug because only a script should look here. As I said, I may be
misreading it.
Regards,
Will
Yes, I did read that and it seems to be somewhat misleading (though that
seems to be of little consequence). Q183495 states:
"After a logon script is run, volatile environment variables created
during logon script execution are deleted from the environment, by
design."
What seems to happen is this: Anything in the key is deleted at logout or
shutdown. At login time, LOGONSERVER is recorded there, and, apparently,
EXPLORER makes a permanent note of LOGONSERVER and, though it's not in the
machine environment or the user environment, EXPLORER puts it in the
environment of subsequently started programs. Thus LOGONSERVER continues to
be available after login. In addition, the value in the registry key is not
deleted. The registry value can be deleted manually, however, and this has
no effect (since EXPLORER seems to have its own record of this variable);
EXPLORER continues to put LOGONSERVER into process environments. If any
other variables are put in "HKCU\Volatile Environment" at logon time, they
ARE deleted, but LOGONSERVER is not. The "HKCU\Volatile Environment" key
seems never to be read again.
"When a logon script is run, the LOGONSERVER environment variable is
only available while the logon script runs. After the logon script
finishes, the LOGONSERVER environment variable is no longer available to
other running processes."
"Therefore, after a logon script has been run, the LOGONSERVER
environment variable is erased from the environment."
Perhaps SP4 changed this behavior and the KB was never updated.
- Vince
On Wed, 16 Dec 1998 22:47:35 -0500, "William DePalo [MVP]"
<depalow...@compuserve.com> wrote:
>Vincent Fatica wrote in message <36786131.4058474898@news-server>...
>> "After a logon script is run, volatile environment variables created
>> during logon script execution are deleted from the environment, by
>> design."
>
>As I said, I might be all wet. But I think the article is a Clintonesque way
>of admitting (but not really) to a bug. I think it tries to say that a login
>script that sets environment variables will set them here and that they are
>deleted after the script runs. However, in the case where there is no script
>to run, the one created automatically doesn't get deleted. But it ain't
>really a bug because only a script should look here. As I said, I may be
>misreading it.
>
>Regards,
>Will
>
>
>
>
___
At $300+ per hour, you can get all the lawyerly points of view you want. :-)
As for the accuracy of the kb article, I just don't know.
Regards,
Will