Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. System Admin
  4. WMI Scripting Questions

WMI Scripting Questions

Scheduled Pinned Locked Moved System Admin
dockertools
1 Posts 1 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Joe Paisley
    wrote on last edited by
    #1

    From the user logon script I am attempting to determine whether or not the connection is via a dial-up connection or through the Ethernet adapter. The clients are all running Windows 2000. I have been trying to use WMI to extract the information. I can successfully pull information using the Win32_POTSModem, but this does not provide information about an actual connection. When I tried to use Win32_SerialPortConfiguration I began having problems getting the script to run properly. I have provided the SUB I am using. Any advice anyone have would be appreciated. Private Sub Check_Modem() Dim objWMI, objModemSet, Modem, ModemInfo Dim SerialPortSet, SerialPort, SerialPortInfo Dim Dialup AS Boolean Set objWMI = GetObject("winmgmts:") Set objModemSet = objWMI.InstancesOf("Win32_POTSModem") Set objSerialPortSet = objWMI.InstancesOf("Win32_SerialPortConfiguration") For Each Modem In objModemSet For Each SerialPort in objSerialPortSet If SerialPort.Name = Modem.AttachedTo Then If SerialPort.IsBusy Then Dialup=True End If End If Next Next End sub Thanks Joe Paisley Smurfit-Stone Container X| Joe Paisley

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups