• 0

VB.NET - Get connected SSID in Vista


Question

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

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.