Discussion:
VBS Logon Script not always executing upon logon on TS
(too old to reply)
KLO11
2005-06-29 13:59:25 UTC
Permalink
I have a VBS logon script thats called from a batch file (logon.bat).
Sometimes, kinda rare, it doesn't execute for various users. Our
helpdesk team has to Remote Control them and run it manually from
%logonserver%\netlogon\logon.bat

I'm trying to develop a pattern here, but it's hard to pin down:

1. Varies from user to user.
2. All users are setup the same in ADS w/ the same logon script info.
3. The Terminal Servers are the same.
4. Seems to only happen on our Terminal Servers, not local machines
5. All servers have the same version of the scripting engine 5.6


Anyone else experiencing the same issue?
Olaf Engelke [MVP Windows Server]
2005-06-29 21:25:45 UTC
Permalink
Hi,
Post by KLO11
I have a VBS logon script thats called from a batch file (logon.bat).
why not directly run that VBSscript?
Post by KLO11
Sometimes, kinda rare, it doesn't execute for various users. Our
helpdesk team has to Remote Control them and run it manually from
%logonserver%\netlogon\logon.bat
1. Varies from user to user.
Everytime the same users?
Post by KLO11
2. All users are setup the same in ADS w/ the same logon script info.
3. The Terminal Servers are the same.
4. Seems to only happen on our Terminal Servers, not local machines
5. All servers have the same version of the scripting engine 5.6
Are the affected users Administrators?
Is the batch file executed at all or is it only the VBScript or the
interpreter, which is not found at runtime?
Are there multiple Domain controllers in the domain and could it be, that
the scripts are not properly replicated to all of them?
Why don't you use Group Policies to assign logon scripts?
Best greetings from Germany
Olaf.
KLO11
2005-06-30 15:56:47 UTC
Permalink
Post by Olaf Engelke [MVP Windows Server]
Hi,
Post by KLO11
I have a VBS logon script thats called from a batch file (logon.bat).
why not directly run that VBSscript?
Post by KLO11
Sometimes, kinda rare, it doesn't execute for various users. Our
helpdesk team has to Remote Control them and run it manually from
%logonserver%\netlogon\logon.bat
1. Varies from user to user.
Everytime the same users?
Post by KLO11
2. All users are setup the same in ADS w/ the same logon script info.
3. The Terminal Servers are the same.
4. Seems to only happen on our Terminal Servers, not local machines
5. All servers have the same version of the scripting engine 5.6
Are the affected users Administrators?
Is the batch file executed at all or is it only the VBScript or the
interpreter, which is not found at runtime?
Are there multiple Domain controllers in the domain and could it be,
that the scripts are not properly replicated to all of them?
Why don't you use Group Policies to assign logon scripts?
Best greetings from Germany
Olaf.
I thought you had to call a vbs script from a BAT file?
The problem varies from user to user not always same user.
All users are in ADS.
We have two domain controllers and the script is identical on both.
Never thought about it, my script is monolithic and covers everything.
Olaf Engelke [MVP Windows Server]
2005-07-01 11:58:34 UTC
Permalink
Hi,
Post by KLO11
Post by Olaf Engelke [MVP Windows Server]
Hi,
Post by KLO11
I have a VBS logon script thats called from a batch file
(logon.bat).
why not directly run that VBSscript?
Post by KLO11
Sometimes, kinda rare, it doesn't execute for various users. Our
helpdesk team has to Remote Control them and run it manually from
%logonserver%\netlogon\logon.bat
1. Varies from user to user.
Everytime the same users?
Post by KLO11
2. All users are setup the same in ADS w/ the same logon script
info. 3. The Terminal Servers are the same.
4. Seems to only happen on our Terminal Servers, not local machines
5. All servers have the same version of the scripting engine 5.6
I thought you had to call a vbs script from a BAT file?
no, if vbs files execute automatically on double click this is not
necessary.
Post by KLO11
The problem varies from user to user not always same user.
All users are in ADS.
We have two domain controllers and the script is identical on both.
Never thought about it, my script is monolithic and covers everything.
If it would not be the Terminal Server, I would ask now to logoff and logon
again to see it the problem goes away that way (since often such things
happen, while the network interface is not ready, if the user already tries
to logon).
Does the behaviour change, if the certain users are logging in through the
console directly on that server?
Are there any issues reported in the event log or any error messages on the
screen?
You may also check, if something of the information listed on following
pages can help you to resolve the issue:
http://www.computerperformance.co.uk/Logon/Logon_Script_Troubleshooting.htm

Best greetings from Germany
Olaf
KLO11
2005-07-01 13:34:56 UTC
Permalink
Post by Olaf Engelke [MVP Windows Server]
Post by KLO11
Post by Olaf Engelke [MVP Windows Server]
Hi,
Post by KLO11
I have a VBS logon script thats called from a batch file
(logon.bat).
why not directly run that VBSscript?
Post by KLO11
Sometimes, kinda rare, it doesn't execute for various users. Our
helpdesk team has to Remote Control them and run it manually from
%logonserver%\netlogon\logon.bat
1. Varies from user to user.
Everytime the same users?
Post by KLO11
2. All users are setup the same in ADS w/ the same logon script
info. 3. The Terminal Servers are the same.
4. Seems to only happen on our Terminal Servers, not local machines
5. All servers have the same version of the scripting engine 5.6
I thought you had to call a vbs script from a BAT file?
no, if vbs files execute automatically on double click this is not
necessary.
Post by KLO11
The problem varies from user to user not always same user.
All users are in ADS.
We have two domain controllers and the script is identical on both.
Never thought about it, my script is monolithic and covers everything.
If it would not be the Terminal Server, I would ask now to logoff and
logon again to see it the problem goes away that way (since often such
things happen, while the network interface is not ready, if the user
already tries to logon).
Does the behaviour change, if the certain users are logging in through
the console directly on that server?
Are there any issues reported in the event log or any error messages on
the screen?
You may also check, if something of the information listed on following
http://www.computerperformance.co.uk/Logon/Logon_Script_Troubleshooting.htm
What we do is ask the user to logoff and back on and then the script
runs. The Server was up for many hours before they try to login. This
will happen after other users have already logged in thus my head
scratching.

No errors in the Event Log at all. No errors on the screen. My next
step is to apply this logon script to the default domain as a policy.
Is this what you'd suggest also?

Thanks for all the help thus far.
Olaf Engelke [MVP Windows Server]
2005-07-05 19:05:32 UTC
Permalink
Hi again,
Post by KLO11
Post by KLO11
I have a VBS logon script thats called from a batch file
(logon.bat).
What we do is ask the user to logoff and back on and then the script
runs. The Server was up for many hours before they try to login. This
will happen after other users have already logged in thus my head
scratching.
they have logged in to the server, but not on THAT client, right?
So there is a group policy:
"Always wait for network"
which you may want to apply to your clients in
Computer Configuration\Administrative Templates\System\Logon

Check also here:
http://www.microsoft.com/technet/prodtechnol/windowsserver2003/library/Operations/dfe7b84d-8727-4561-9767-ccb47a5bf9ba.mspx

(The users currently get logged on, while the PC is not completely ready, so
the logon happens with cached credentials and domain stuff will not be
processed. If it took a bit longer to process the first coffee before
logging in it works.)

Best greetings from Germany
Olaf

Loading...