Very long shutdown time due to running shutdown scripts

I have a strange problem. We have some standard non-complicated shutdown scripts that we run for our XP SP3 clients. But for some reason when PCs are being shutdown or restarted they can sit at the 'running shutdown scripts' information box for 5-10 minutes, whereas other PCs pass this stage in the normal amount of time.

There is no difference in the scripts that these PCs run so I need to find out why or how this is happening.

Any ideas?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Usually timeout errors would cause long delays.  Can you give us the script code?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Iain MacMillanIT Regional Manager - UKCommented:
could be delays in shutting down some services/drivers.  are all the systems running the same software packages.  have you applied the latest UPHClean (User Profile Hive Clean-up) that was released to finally get rid of problems with user profiles not unloading.  Last update Sept. 2010

You can find the latest v1.6g here - we now have this applied to almost all our XP systems now.
are the roamingprofiles large?
try without roaming profiles.
are rights a problem?
network problems? try a different port
what changed in the network/PCsettings/Usersettings?
when did you had a workable situation
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

Jared LukerCommented:
I agree that it's probably time out problems.  Are you calling an executable that might not be available at shutdown.  In VBSCript, if you do a to a target that does not exist or can not be accessed, then it'll take a long time to time out and move on.
sydlegAuthor Commented:
Thanks for the pointer to check the script code. Even though I am not sure why the script times out only some PCs, i disabled it. I did want some clues about how to monitor the code while it is running after log off.
Thanks for the points.  Usually the best way to monitor the script on these machines would be to modify the script.  Insert diagnostic logging comments with timestamps,  something like,
echo "Disconnecting Drive Q:"  >> logfile.txt
Then examine the logs for answers.
I'd recommend making a new question and posting your script, ask for optimizations and diagnostic troubleshooting tips.
sydlegAuthor Commented:
Thanks again for further follow up :)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2003

From novice to tech pro — start learning today.