neverending script problem

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Mike Koch (mikey_at_NOSPAMebgames.com)
Date: 11/17/04


Date: Wed, 17 Nov 2004 10:20:56 -0500

I've got an odd problem here, involving a login script and a freshly
upgraded server.

The login script has been in use for almost two years, and has not been
modified recently. It works just fine on every machine in the domain, except
one. On this one, it gets stuck in a loop, using 50% CPU time until I kill
it in task manager.

Up until this past Saturday, the server was running Windows 2000 Server
Standard w/ SP4 and Exchange Server 2000 Enterprise Edition. In this
configuration, the login script worked just fine.

On Friday night, the server was upgraded to Exchange Server 2003 Enterprise
Edition and SP1. No problems were encountered during the upgrade, and the
Exchange server is working perfectly.

On Saturday evening, the server was upgraded to Windows Server 2003 Standard
Edition, plus all critical hotfixes and patches from windowsupdate. No
problems were encountered during the upgrade, and aside from this script
problem, the server is working perfectly.

When any administrator logs on, the server becomes sluggish, and when task
manager is opened, there are two instances of cscript.exe running, and each
one is using close to 50% of CPU, which explain the sluggishness. Kill those
processes and the server returns to normal.

The script runs fine on every other machine in the domain, be it Windows
2000 Pro, Windows XP Pro, Windows 2000 Server, or Windows Server 2003.

The script in question does nothing more than determine the user's group
memberships, then maps drives accordingly. Here's a snippet of the code:

dim ousr, nuser, ogrp, domain, username
domain = "MyDomain"
set nuser = wscript.createobject("Wscript.network")
username = nuser.username
set oUsr = getobject("WinNT://" & domain & "/" & username & ",user")
set Grp = oUsr.Groups
GrpID = oUsr.PrimaryGroupID
GrpName = ""

'*** Build Query Filter for the search for all the groups that the user is a
member of.
QueryFilter = "(|"
for each Item in Grp
   NT4Name = replace(Item.ADsPath,"WinNT://","")
   tempArray = split(nt4Name,"/")
   NT4Name = tempArray(1)
   QueryFilter = QueryFilter & "(samAccountName=" & NT4Name & ")"
next
QueryFilter = QueryFilter & ")"

Near as I can tell, the script never gets out of thew above for...next loop,
which doesn't make sense, since the user only has so many groups - no more
than 10 or 12 at most, usually less.

Since the script works on every other mahcine in the domain, I'm wondering
if WSH somehow got hosed during the upgrade. Maybe I'll try downloading and
installing the latest version of WSH, but in the mean time, I thought I'd
throw this out for discussion, to see if anyone else has any ideas.

Thanks,
Mike



Relevant Pages

  • Re: NT to W2K3 Migration
    ... You cannot just promote a member server to AD. ... upgrade your PDC to windows 2000 or 2003, whichever flavor of AD you want to ... Upgrading from Windows NT Server 4.0 ... ensure that you have designed a DNS ...
    (microsoft.public.windows.server.active_directory)
  • Re: NT to W2K3 Migration
    ... How to Upgrade from Windows NT Server 4.0 ... Best Practice Active Directory Design for Managing Windows Networks ...
    (microsoft.public.windows.server.active_directory)
  • Re: Native 2003 mode and NT4 workstations?
    ... Migrating from Windows NT Server 4.0 to Windows Server 2003 ... How to Upgrade from Windows NT Server 4.0 ... ensure that you have designed a DNS ...
    (microsoft.public.windows.server.active_directory)
  • Re: Migrating NT4 to Windows 2003
    ... Migrating from Windows NT Server 4.0 to Windows Server 2003 ... How to Upgrade from Windows NT Server 4.0 ... Best Practice Active Directory Design for Managing Windows Networks ...
    (microsoft.public.windows.server.active_directory)
  • Re: Migrating NT4 to Windows 2003
    ... Migrating from Windows NT Server 4.0 to Windows Server 2003 ... How to Upgrade from Windows NT Server 4.0 ... Best Practice Active Directory Design for Managing Windows Networks ...
    (microsoft.public.windows.server.active_directory)