|
There are a few ways to make the script wait until the
user is logged in; here's a snippet that I use:
'Pause Script until User is Logged
in
Do Username = WSHNetwork.UserName Loop Until Username <> "" Derek From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Darren Mar-Elia Sent: Thursday, December 08, 2005 8:54 PM To: [email protected] Subject: RE: [ActiveDir] envoirment variables Tom-
I gave you bum advice the first time. By running the script
synchronously, you essentially are running it before the user environment loads
and hence probably don't have access to the per-user environment variables when
the script is running. Run asynchronously doesn't guarantee getting such access
but you have a better chance at it. Better yet, if you don't need those
environment variables to take effect at the first logon you could implement them
as custom ADM templates, since per-user environment variables are stored as reg
values under HKEY_CURRENT_USER\Environment.
Darren From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brian Desmond Sent: Thursday, December 08, 2005 4:13 PM To: [email protected] Subject: RE: [ActiveDir] envoirment variables Tom, You
might want to run your messages through the spell checker in the future – I had
to read this a few times to process it. I’m
not sure how this would log anything in the event
log. Well
since you tried it synchronously, why don’t you try it asynchronously? Have you
tried echo’ing the environment variables to a text file as part of your script?
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Tom Kern I have a logon script via a user gpo that sets
enviorment variables. However those variables are never
set. Gpresult claims the gpo was processed and i have nothing
in my event logs. The script was set to run synchronously. Is that the
issue. are the variables not there to set
yet? thanks |
- RE: [ActiveDir] envoirment variables Derek Harris
- RE: [ActiveDir] envoirment variables Darren Mar-Elia
- RE: [ActiveDir] envoirment variables Derek Harris
