Jump to content

wmi problems in autoit beta version (v3.3.11.3)


Recommended Posts

Hi everybody,
 
I write to tell you that persists the problem  with WMI functions still  in version 3.3.11.3. 
In a function for obtain network data, error occurs with the network cable disconnected 
 
Example

local $objWMI = ObjGet('winmgmts:{impersonationLevel = impersonate}!\\' & '.' & '\root\cimv2')
Global $collection = $objWMI.ExecQuery("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE"), $aReturn[9] = [0]


For $oObjectItem In $collection
            If $oObjectItem.IPAddress(0) == @IPAddress1 Then
                $aReturn[0] = 4
                $aReturn[1] = $oObjectItem.IPAddress(0)
                $aReturn[2] = $oObjectItem.DHCPEnabled
                $aReturn[3] = $oObjectItem.DefaultIPGateway(0)
                $aReturn[4] = $oObjectItem.MACAddress
        $aReturn[5] = $oObjectItem.DNSServerSearchOrder(0)
        $aReturn[6] = $oObjectItem.DNSServerSearchOrder(1)
        $aReturn[7] = $oObjectItem.IPSubnet(0)
        $aReturn[8] = $oObjectItem.Description
        EndIf


Next

In the old version 3.3.8.1 this script works ok.

sorry for my bad English 

Thanks for help

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...