Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I specify a timeout on ExecQuery (winmgmts)?

Status
Not open for further replies.

FancyPrairie

Programmer
Oct 16, 2001
2,917
US
I've put together some code that extracts information from each computer in our domain. For example, the following code will get printer information.
Code:
Set objWMIService = GetObject("winmgmts:\\" & strComputerName & "\root\cimv2")
Set colOS = objWMIService.ExecQuery("SELECT * FROM Win32_Printer")

However, sometimes my code just hangs after issuing the ExecQuery. Is there a timeout parameter for this call?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top