Does anyone know how to get the currently connected SSID in Vista? I used to use the code below in XP and it worked fine, but Vista doesn't seem to support it.
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\WMI")
Set colItems = objWMIService.ExecQuery( _
"SELECT * FROM MSNdis_80211_ServiceSetIdentifier",,48)
For Each objItem in colItems
Wscript.Echo "-----------------------------------"
Wscript.Echo "MSNdis_80211_ServiceSetIdentifier instance"
Wscript.Echo "-----------------------------------"
If isNull(objItem.Ndis80211SsId) Then
Wscript.Echo "Ndis80211SsId: "
Else
Wscript.Echo "Ndis80211SsId: " & Join(objItem.Ndis80211SsId, ",")
End If
Next
Question
DMilner
Does anyone know how to get the currently connected SSID in Vista? I used to use the code below in XP and it worked fine, but Vista doesn't seem to support it.
strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\WMI") Set colItems = objWMIService.ExecQuery( _ "SELECT * FROM MSNdis_80211_ServiceSetIdentifier",,48) For Each objItem in colItems Wscript.Echo "-----------------------------------" Wscript.Echo "MSNdis_80211_ServiceSetIdentifier instance" Wscript.Echo "-----------------------------------" If isNull(objItem.Ndis80211SsId) Then Wscript.Echo "Ndis80211SsId: " Else Wscript.Echo "Ndis80211SsId: " & Join(objItem.Ndis80211SsId, ",") End If NextLink to comment
Share on other sites
3 answers to this question
Recommended Posts