Re: neverending script problem
From: Mike Koch (mikey_at_NOSPAMebgames.com)
Date: 11/17/04
- Next message: Michael B. - Taz: "Re: Enumerating reg keys with alternate credentials via WMI?"
- Previous message: Michael Harris \(MVP\): "Re: script to delete files"
- In reply to: Mike Koch: "neverending script problem"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 17 Nov 2004 11:42:42 -0500
Found the problem. First, I was wrong about where the script was getting
stuck. After removing an "on error resume next" statement (dumb), I could
easily see the script die with an ADODB.Connection error (this portion was
not in the snippet I included in my previous message). Upon further research
and testing, it appears that the "oledb32.dll" file was not upgraded during
the Windows 2003 upgrade, as it was still at version 2.71, instead of
version 2.80.
The solution was to download the latest MDAC files, extract the oledb32.dll
file, copy it to the proper locations on the server, then register the dll
with the system. The script works perfectly now.
Mike
"Mike Koch" <mikey@NOSPAMebgames.com> wrote in message
news:%23EiiKkLzEHA.352@TK2MSFTNGP14.phx.gbl...
> 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
>
>
- Next message: Michael B. - Taz: "Re: Enumerating reg keys with alternate credentials via WMI?"
- Previous message: Michael Harris \(MVP\): "Re: script to delete files"
- In reply to: Mike Koch: "neverending script problem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|