Sign in to follow this  
Followers 0
ChrisL

Check for WMI

5 posts in this topic

Share this post


Link to post
Share on other sites



$strComputer = 'localhost'
$objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2")
If @error Then
    MsgBox(0,"Error", "Couldn't connect to WMI")
    Exit
EndIf


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Is there anyway to make the check give up quicker if a machine is slow to respond or not going to respond? For some machines I run this on, it takes ~30 seconds to time out. If not, could a timer be implemented somehow to cancel the call if no response if received?

Share this post


Link to post
Share on other sites

idbirch

TimerInit()
TimerDiff()

P.S.

In the future time create your own topic.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0