Re: WMI Timeout possible?
From: TDM (tdm3)
Date: 03/04/05
- Next message: Dennis M. Marks: "Help be modify script"
- Previous message: Flowman: "Configure SMS2003 site settings"
- In reply to: Mooky: "WMI Timeout possible?"
- Next in thread: Mooky: "Re: WMI Timeout possible?"
- Reply: Mooky: "Re: WMI Timeout possible?"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 4 Mar 2005 05:53:47 -0800
Mooky,
I am experiencing the very same problem and it is very annoying. I
don't have a solution for you, but I sure hope you post the fix if and
when you find one.
In my case, they script just hangs, no errors, no warnings, nothing. I
am in a recursive loop migrating registry hives from one computer to
another in a data migration script. I have yet to be able to figure out
why some systems work and others dont. The failure rate in my case
is about 10%. All the systems are set up almost exactly the same from
a standard PC image so this one is a real stumper for me.
Again, please post the fix if you find one.
TDM
"Mooky" <keith@indigotechnologies.us> wrote in message
news:1109905177.096280.179090@g14g2000cwa.googlegroups.com...
>I am using a script that collects information through WMI calls to
> remote computers on a pure Windows 2000 platform (WIn2K computers
> talking to other Win2K computers)
>
> In the script, it uses various ExecQuery calls to the objWMI object
> which I can set up successfully with either of these calls:
>
> Set objWMI = objLocator.ConnectServer(hostName,nameSpace)
> (objLocator is a WbemScripting.SWbemLocator object)
>
> -OR-
>
> Set objWMI = GetObject("winmgmts:\\" & hostName & "\" & nameSpace)
>
> It works great for the most part...when I run across a system that the
> user running the script doesn't have rights to, I get the expected
> error and can trap it accordingly.
>
> The problem is that once in a blue moon I'll hit a system that returns
> NO errors at all...in fact, it never returns from the Set objWMI call
> at all. It just hangs there indefinitly.
>
> I've read traffic about using the wbemConnectFlagUseMaxWait flag in the
> ConnectServer call, but that isn't available on the Win2K platform
> (only works in XP/2003).
>
> Any way to have this call timeout?
>
> I've thought about using asynchrnous execution instead of looping, that
> way I could simply timeout one of the instances if it doesn't return
> from the ConnectServer call...but I'm not certain how I can set up
> asynchronous execution of a whole section of code in lieu of using a
> for each loop from a dictionary object. The catch is that the code
> needs to reference several dictionary objects and make edits to an OLE
> data repository while it loops through the code. All that works
> fine...just this snag with the WMI timeout thing.
>
> The basic code does this:
>
> 1) retrieve list of systems from an OLE source
> 2) retrieve list of systems from AD and compare against list from #1
> 3) loop through all systems
> Each loop does the following
> 3.1) ping the remote system to ensure it can be reached
> 3.2) connect to the remote machines WMI service
> 3.3) collect WMI data
> 3.4) compare collected data to preexisting data from the OLE source
> 3.5) update the OLE source where necessary
> 4) report totals for updates and what not
>
> If I could figure out how to loop through the systems asynchrnously
> that would not only speed up the time it takes to execute (right now
> about 30 minutes for ~600 systems) but it would probably solve the
> issue with the WMI call getting stuck.
>
> Help anyone?
>
> and PLEASE PLEASE reply to me by eMail as I don't monitor newsgroups
> (I'm posting this through google...*sigh*)
>
> keith AT indigotechnologies DOT us
>
> Thanks!
>
- Next message: Dennis M. Marks: "Help be modify script"
- Previous message: Flowman: "Configure SMS2003 site settings"
- In reply to: Mooky: "WMI Timeout possible?"
- Next in thread: Mooky: "Re: WMI Timeout possible?"
- Reply: Mooky: "Re: WMI Timeout possible?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|