Logon script hangs

L

Larry

Is there a way to set a timeout on a logon script. It appears that on some
machines our logon script is hanging for no appearent reason. We use a
standard image on all computers and 1 out of 50 seem to hang while
processing the script.

What I would like to be able to do is have it wait 30 seconds or so then
continue/exit. Any ideas?

thx...
 
M

Mark V

In said:
Is there a way to set a timeout on a logon script. It appears that
on some machines our logon script is hanging for no appearent
reason. We use a standard image on all computers and 1 out of 50
seem to hang while processing the script.

What I would like to be able to do is have it wait 30 seconds or
so then continue/exit. Any ideas?

Why not just determine _why_ and _where_ they hang and fix it?

The only messy thing I can think of is to start the actual script in a
new process, wait some while then kill the "hung" process if it still
exists.
 
A

Al Dunbar [MS-MVP]

Mark V said:
Why not just determine _why_ and _where_ they hang and fix it?

The only messy thing I can think of is to start the actual script in a
new process, wait some while then kill the "hung" process if it still
exists.

If the logon script is a batch file that starts a .vbs, .js, or .wsf file
with either cscript.exe or wscript.exe, you can add the "/T:30" switch to
specify your timeout.

/Al
 
M

Michael Bednarek

Is there a way to set a timeout on a logon script. It appears that on some
machines our logon script is hanging for no appearent reason. We use a
standard image on all computers and 1 out of 50 seem to hang while
processing the script.

What I would like to be able to do is have it wait 30 seconds or so then
continue/exit. Any ideas?

Group Policy:
Computer Configuration
Administrative Templates
System
Scripts: Maximum wait time for Group Policy scripts
Default: 600 seconds

I would, however, caution against reducing this value. It's likely that
some of your legitimate startup/logon scripts might well need more than
10 minutes, e.g. when you install 4 patches in one hit (13-Apr!). In
fact, I have disabled (=0) this setting altogether.

You should investigate why these scripts are not executing as you
expect. Showing the code here might help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top