locked
Active ssid from WMI api RRS feed

  • Question

  • Hi Guys,

     

    I am trying to read Active SSID for my wireless connection on laptop/pc using WMI API in AutoIt.

     

     $objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\wmi")
        $objMSNdis_80211_ServiceSetIdentifierSet = $objWMIService.ExecQuery("Select * from MSNdis_80211_ServiceSetIdentifier Where active=true")

    For $objMSNdis_80211_ServiceSetIdentifier In $objMSNdis_80211_ServiceSetIdentifierSet

         $ID = ""
            For $i = 0 To $objMSNdis_80211_ServiceSetIdentifier.Ndis80211SsId(0)
                 $ID = $ID & Chr($objMSNdis_80211_ServiceSetIdentifier.Ndis80211SsId($i + 4))
            Next
           $SSID = $ID
    Next

     

    same code is working fine on one XP box and is not working on another XP box. I checked wether WMI is running on the other box where i am getting empty SSID, it running. Even i am getting the $objMSNdis_80211_ServiceSetIdentifierSet list which is empty. I am suspecting one of the serivce in WMI need's to be started. Please if any one have thoughts, put some light on this.

     

    Thanks,

    sainumpudi.

     

     

     

     

     

    Wednesday, September 17, 2008 8:21 PM