Re: ExecQuery hangs whole script but GetObject is fine
From: Gerry Hickman (gerry666uk_at_yahoo.co.uk)
Date: 02/19/05
- Next message: Gerry Hickman: "Re: Login script with admin priveleges"
- Previous message: Gerry Hickman: "Re: More"
- In reply to: Brandon McCombs: "ExecQuery hangs whole script but GetObject is fine"
- Next in thread: Gerry Hickman: "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: Sat, 19 Feb 2005 02:53:28 +0000
Hi Brandon,
Please can you write a small script that attempts this ExecQuery, then
ensure it hangs three times on the rogue machine and works three times
on a good machine, then post it here.
Connect to the rogue machine as a domain admin, right-click "My
Computer" then "Manage"; does the security log instantly appear on screen?
Brandon McCombs wrote:
> 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
>
-- Gerry Hickman (London UK)
- Next message: Gerry Hickman: "Re: Login script with admin priveleges"
- Previous message: Gerry Hickman: "Re: More"
- In reply to: Brandon McCombs: "ExecQuery hangs whole script but GetObject is fine"
- Next in thread: Gerry Hickman: "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
|