vbs: Check Ras Function using wmi?

Home Forums Scripting Windows Script Host vbs: Check Ras Function using wmi?

This topic contains 2 replies, has 1 voice, and was last updated by Avatar Dumber 15 years, 5 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • Avatar
    Dumber
    Participant
    #98137

    im looking for a function to check of a RAS connection is established using WMI.

    Right now im using a script wich does the following:

    opens a dosbox with ipconfig
    a loop will check every line until he find PPP. if he find thats, a ppp connection is present and terminates the script. else he will loop until the end of the output.

    im still migrating my current KIXscript to VBS but i can’t find something else…

    Avatar
    Dumber
    Participant
    #194269

    nobody?

    currently im using the following script:

    Code:
    Option Explicit
    Dim oShell,oExecuteObj,strcmd
    Set oShell = CreateObject (”Wscript.Shell”)
    Set oExecuteObj = oShell.Exec(”cmd /c ipconfig.exe”)
    Do While Not oExecuteObj.StdOut.AtEndOfStream
    strcmd = oExecuteObj.StdOut.ReadLine()
    If Instr(strcmd, “PPP”) > 0 Then
    Wscript.Echo “dialup connection established…”
    Exit Do
    End If
    Loop

    but i want to use WMI classes… but how?

    Avatar
    Dumber
    Participant
    #194291

    nobody got a clue???

    it must be possible (i think)

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.