WMI Code Creator v1.0 and windows 7/8

Answered WMI Code Creator v1.0 and windows 7/8

  • Wednesday, January 30, 2013 7:01 PM
     
     

    god day to the script gay

    I have made the script

    strComputer = "."
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\WMI")
    Set colItems = objWMIService.ExecQuery( _
        "SELECT * FROM MSNdis_80211_BaseServiceSetIdentifier",,48)
    For Each objItem in colItems
        Wscript.Echo "-----------------------------------"
        Wscript.Echo "MSNdis_80211_BaseServiceSetIdentifier instance"
        Wscript.Echo "-----------------------------------"
        If isNull(objItem.Ndis80211MacAddress) Then
            Wscript.Echo "Ndis80211MacAddress: "
        Else
            Wscript.Echo "Ndis80211MacAddress: " & Join(objItem.Ndis80211MacAddress, ",")
        End If
    Next

    with WMI Code Creator v1.0

    and when I run it from windows xp its run ok

    bat when I tary to run it from windows 7 or 8 I get error

    D:\>cscript d:\MyWMIQueroldy.vbs
    Microsoft (R) Windows Script Host Version 5.8
    Copyright (C) Microsoft Corporation. All rights reserved.

    d:\MyWMIQueroldy.vbs(5, 1) (null): 0x8004100C

    of curse I run it as administrator

    looking for help 

    yours

    miki

     

All Replies

  • Wednesday, January 30, 2013 8:34 PM
     
     

    It is not a usable class on XP or on Win 7 or 8.


    ¯\_(ツ)_/¯

  • Thursday, January 31, 2013 4:36 PM
     
     

    so can i use it on windows 7

    its workin fine on windows xp

    or mabe ther is spower shell that i can use

  • Thursday, January 31, 2013 5:41 PM
    Moderator
     
     Answered Has Code

    I could not find a reference to that class in the documentation. Also, here's what I see in PowerShell on Windows 7:


    PS C:\> get-wmiobject -class "MSNdis_80211_BaseServiceSetIdentifier" -namespace "root\WMI"
    Get-WmiObject : Not supported
    At line:1 char:5
    + get-wmiobject <<<<  -class "MSNdis_80211_BaseServiceSetIdentifier" -namespace "root\WMI"
        + CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], ManagementException
        + FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
    

    It appears that the MSNdis_80211_BaseServiceSetIdentifier WMI class is no longer supported.

    Bill


  • Thursday, January 31, 2013 6:21 PM
     
     Answered

    thank you all I found work around by running

    netsh wlan show interfaces | find "BSSID"

    this give me the same resolt

    • Marked As Answer by מיקי01 Thursday, January 31, 2013 6:22 PM
    •