/build/static/layout/Breadcrumb_cap_w.png

SSID active from Windows 7

Hi all,
I need to know the name SSID that a machine is conected for later run other script if the name is correct.
I got this script from internet that work well for windows xp but not for windows 7 64 bits.
Somebody knows why fail?
Thanks


'on error resume next
Private Sub GetWMI(WMIArray, WMIQuery)
' On error resume Next
Set WMIClass = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\wmi")



If not(WMIClass is nothing) Then
Set WMIArray = WMIClass.ExecQuery(WMIQuery)

end if
End Sub


Function SSID()
' On error resume Next

Call GetWMI(objMSNdis_80211_ServiceSetIdentifierSet, "Select * from MSNdis_80211_ServiceSetIdentifier Where active=true")

For Each 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
End Function

wscript.echo SSID()

0 Comments   [ + ] Show comments

Answers (0)

Be the first to answer this question

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ