ExecQuery hangs whole script but GetObject is fine
From: Brandon McCombs (bmccombs_at_ma.rr.com)
Date: 02/18/05
- Next message: Peter Falz: "Re: ExecQuery hangs whole script but GetObject is fine"
- Previous message: Tomasz Onyszko [MVP]: "How to get single object with"
- Next in thread: Peter Falz: "Re: ExecQuery hangs whole script but GetObject is fine"
- Reply: Peter Falz: "Re: ExecQuery hangs whole script but GetObject is fine"
- Reply: Gerry Hickman: "Re: ExecQuery hangs whole script but GetObject is fine"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 18 Feb 2005 02:17:08 GMT
Hi everyone,
I have a relatively big VBS file to handle connecting to every valid
machine account in a win2k3 ADS domain and to backup the security event
log to a file server. For each machine account in ADS the script
connects to the WMI interface, does a query to get the list of logs of
name "Security" of which there is of course only one, and then uses the
BackupEventLog() method to back up the file.
The problem stems from the fact that some machines lately have trouble
executing the query and the query hangs and thus the whole script
hangs. The GetObject() returns fine but the ExecQuery does not so a 'on
error resume next' is useless w/o an error, same with checking for an
error code. I've tried ConnectServer and it didn't seem to make a
difference as, again, I can connect just fine but the query doesn't ever
complete.
I'm very new to VBS and especially WMI so I might be missing something
easy to get around this problem. Also, the scheduled task that normally
runs this script runs at 1am every night and when I come in around 9 or
10am the task is still running so if there is a timeout on the query it
must be a long one.
Does anyone have any ideas?
The client machines are all XP SP2 and I'm executing the script from one
of the DCs as a domain admin but in the scheduled task that the script
normally runs in there is a separate account belonging to the domain
admins group that the task runs as. Both manual and scheduled methods
have trouble.
thanks
brandon
- Next message: Peter Falz: "Re: ExecQuery hangs whole script but GetObject is fine"
- Previous message: Tomasz Onyszko [MVP]: "How to get single object with"
- Next in thread: Peter Falz: "Re: ExecQuery hangs whole script but GetObject is fine"
- Reply: Peter Falz: "Re: ExecQuery hangs whole script but GetObject is fine"
- Reply: Gerry Hickman: "Re: ExecQuery hangs whole script but GetObject is fine"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|