Announcement

Collapse
No announcement yet.

vbs: Check Ras Function using wmi?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • vbs: Check Ras Function using wmi?

    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...
    Marcel
    Technical Consultant
    Netherlands
    http://www.phetios.com
    http://blog.nessus.nl

    MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
    "No matter how secure, there is always the human factor."

    "Enjoy life today, tomorrow may never come."
    "If you're going through hell, keep going. ~Winston Churchill"


  • #2
    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?
    Marcel
    Technical Consultant
    Netherlands
    http://www.phetios.com
    http://blog.nessus.nl

    MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
    "No matter how secure, there is always the human factor."

    "Enjoy life today, tomorrow may never come."
    "If you're going through hell, keep going. ~Winston Churchill"

    Comment


    • #3
      nobody got a clue???

      it must be possible (i think)
      Marcel
      Technical Consultant
      Netherlands
      http://www.phetios.com
      http://blog.nessus.nl

      MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
      "No matter how secure, there is always the human factor."

      "Enjoy life today, tomorrow may never come."
      "If you're going through hell, keep going. ~Winston Churchill"

      Comment

      Working...
      X