+ Post New Thread
Results 1 to 4 of 4
Scripts Thread, WMI Using 2 Classes in Coding and Web Development; Basically trying to use 2 WMI Classes in vbscript so that I can get the below information hopefully from one ...
  1. #1

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,756
    Thank Post
    3,266
    Thanked 1,052 Times in 973 Posts
    Rep Power
    365

    WMI Using 2 Classes

    Basically trying to use 2 WMI Classes in vbscript so that I can get the below information hopefully from one query

    * MAC Address
    * Vendor
    * Link Speed ( as in current link speed not the maximum speed the NIC Can get or use )
    * Active / Status ( As in connected, not connected, obtaining ip address etc )
    * I.Pv4 Address
    * Subnet Mask
    * Default Gateway
    * DNS Servers
    * DHCP Servers
    * MTU of current Interface

    win32_NetworkAdapter allows you to get MAC Address, vendor, link status, link speed etc where as win32_NetworkAdapterConfiguration allows you to get ip address, subnet mask, default gateway, dhcp servers, dns servers and other info

    Currently have a HTA using vbscript and WMI but can only seem to do one query at a time ie one query on win32_NetworkAdapter and one query on win32_NetworkAdapterConfiguration but due to using NetworkAdapter to enumerate only physical network adapters into a dropdown menu I need it to pull the info for each relevant Interface each time you select a different interface from the drop down menu.
    @Steve21 and @Arthur or anyone else

    Thanks
    Last edited by mac_shinobi; 22nd April 2013 at 05:20 PM.

  2. #2
    bainer's Avatar
    Join Date
    Apr 2013
    Location
    West Yorkshire
    Posts
    8
    Thank Post
    0
    Thanked 3 Times in 3 Posts
    Rep Power
    0
    Can you share what you have already?

  3. Thanks to bainer from:

    mac_shinobi (1st May 2013)

  4. #3

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,756
    Thank Post
    3,266
    Thanked 1,052 Times in 973 Posts
    Rep Power
    365
    Also having issue(s) with the IP Address , as far as on some adapters that do not have an ip address ( version 4 or 6 ) you get an error message stating that the subscript range is out or does not exist so presume this is to do or related to me trying to split the results as originally it was outputting both the ipv4 and 6 addresses together on one line with a comma ie x.x.x.x, Y.Y.Y.Y

    Could do with help on how to get the IPv4 and the IPv6 addresses better ?
    @Chaddy - Is trying to help me with the CSS / GUI and could do with him re-uploading his version again as never got a chance to download his tweaked copy.

    Code:
    
    Network Utility
    
    
    
    
    
    
    
    Select a network interface for information:

    Interface Information:

    Chaddy did mention about the CSS to round the corners off only working in IE 9 or above, I have version 10 and the rounded corners still do not work, have mucked about with the css which I know is applying as I can change the colours and width of the borders which seem to apply fine but the border-radius and other things I am putting in the css are not applying as far as rounding the corners on the table

    Updated CSS :

    Code:
     
    
    See attached PNG Image
    Attached Images Attached Images
    Last edited by mac_shinobi; 1st May 2013 at 01:21 PM.

  5. #4

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,756
    Thank Post
    3,266
    Thanked 1,052 Times in 973 Posts
    Rep Power
    365
    Tried the code tweak that @Chaddy has done but it breaks MSHTA and other things which means the vbscript side does not work as it should , as per this article

    When using an HTA on IE9 the GetObject function is undefined when specifying X-UA-Compatible tag

    So how am I supposed to make it so that it supports and does the CSS / GUI and also allows the vbscript to work correctly

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 16
    Last Post: 1st September 2011, 08:35 AM
  2. Replies: 29
    Last Post: 7th November 2010, 01:41 AM
  3. Replies: 20
    Last Post: 25th January 2010, 12:59 PM
  4. Replies: 10
    Last Post: 8th May 2009, 12:20 PM
  5. Any one using Sharepoint or class server.?
    By tosca925 in forum Windows
    Replies: 11
    Last Post: 15th November 2005, 03:35 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •