[windows2000] Scripts Hang... And my solution

  • From: "Sullivan, Glenn" <GSullivan@xxxxxxxxxxxxxx>
  • To: <windows2000@xxxxxxxxxxxxx>
  • Date: Thu, 12 Apr 2007 09:29:56 -0400

I have been working with our subsidiary to convert their systems from a
mishmash of barely connected system, into a real domain of machines.  If
there's one thing that I've grown to rely on in my environment, it is
the ability to script my way into and out of a paper bag, without
ripping a thing.

But I had a couple of machines that just would not cooperate...  The
VBScript Startup and Logon scripts were the problem.

While most machines had no problem with either Startup or Logon scripts,
a couple of the machines just refused to run the scripts.  They would
hang for almost exactly 10 minutes at "Running Startup Scripts" and also
at the point where a logon script would be running.  And the log file
that the scripts create was nonexistent, so I knew that there was
something wrong...

Some web searching brought me to this KB:
"Startup Scripts May Appear to Hang Windows 2000"
http://support.microsoft.com/kb/256320

Which points to problems with network authentication... But I knew that
wasn't it.  The scripts were FINE on some machines, and not on others.
And it's almost the same script that I run here, so I KNEW that there
were no network calls in it...

So, I decided to try to run the scripts manually at a command prompt
with Cscript.  No problem.

I decided to try Wscript.  No problem.

So, I decided that I would look at the processes that were running on
the machine during these 10 minute "hang" times.  Maybe there was some
kind of insidious spyware/virus/rootkit?

I downloaded the PSTools package from Microsoft (formerly SysInternals)
and fired up PSList from another machine on the network, to see what
processes were running.

And there I find, instead of either Cscript or Wscript, NOTEPAD!

Kill Notepad with PSKill, and the hang stops!

Turns out that the former "admin" ran some stupid security program that
decided that the best way to protect against VBScript viruses was to
change the default association for .VBS files from Wscript to NotePad!
And when I tried to export the reg keys from a working machine to import
into the "hanging" machine, I found that it had associated .REG files
with notepad as well!?!

So I created a .REG file that restores the .VBS and .REG entries, and
ran "REGEDIT <filename>.REG" manually, rebooted, and Voila!  Working
scripts!

I just thought I'd share, so that the next time someone is searching for
"hanging scripts" or something similar, maybe this post will come up,
and they won't waste the time that I did...

Ciao,

Glenn Sullivan, MCSE+I MCDBA
David Clark Company Inc. 
*****************************
New Site from The Kenzig Group!
Windows Vista Links, list options
and info are available at:
http://www.VistaPop.com
*****************************
To Unsubscribe, set digest or vacation
mode or view archives use the below link.

http://thethin.net/win2000list.cfm

Other related posts: