Script to tell if client is a RAS connection or not 
Author Message
 Script to tell if client is a RAS connection or not

Is there a way to have a login script tell if the connection is a RAS
connection or not.  I need to branch the script depending on the results.

Steve Thomson



Sat, 06 Apr 2002 03:00:00 GMT  
 Script to tell if client is a RAS connection or not

Actually, if you just run IPconfig you could tell by parsing the results. Additionally there is a control on my site that can provide this information.

Clarence

--
http://cwashington.netreach.net

On THIS site you will find everything you need to get up and running. A
script repository with over 300 FREE sample scripts, a downloads section
with FREE COM objects for scripting, a library of reference materials and a
online discussion lounge to provide community based technical support. Check
it out.

Quote:

> Is there a way to have a login script tell if the connection is a RAS
> connection or not.  I need to branch the script depending on the results.

> Steve Thomson



Sat, 06 Apr 2002 03:00:00 GMT  
 Script to tell if client is a RAS connection or not

Steve,

A simpler way may be to just check the registry....

Function GetDialupStatus()
    Dim strRegValuePath
    Dim vRegValue
    Dim wshShell

    strRegValuePath = "HKLM\System\CurrentControlSet\Services\RemoteAccess\Remote Connection"
    Set wshShell = CreateObject("WScript.Shell")    
    On Error Resume Next
    vRegValue = wshShell.RegRead(strRegValuePath)    
    Select Case Err.number
    Case 0
        GetDialupStatus = (vRegValue(0) = 1)
    Case -2147024894 'Registry key/value not there - assume RAS not installed
        GetDialupStatus = False    
    Case Else
        MsgBox "Error in GetDialupStatus: " & cstr(Err.Number) & " - " & Err.Description
        GetDialupStatus = False    
    End Select
End Function

Regards,

Steve


  Actually, if you just run IPconfig you could tell by parsing the results. Additionally there is a control on my site that can provide this information.

  Clarence

  --
  http://cwashington.netreach.net

  On THIS site you will find everything you need to get up and running. A
  script repository with over 300 FREE sample scripts, a downloads section
  with FREE COM objects for scripting, a library of reference materials and a
  online discussion lounge to provide community based technical support. Check
  it out.

  > Is there a way to have a login script tell if the connection is a RAS
  > connection or not.  I need to branch the script depending on the results.
  >
  > Steve Thomson
  >
  >



Sun, 07 Apr 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Script to DIAL a RAS connection???

2. RAS/Dial-Up connection creation script?

3. scripting a RAS (PPTP) connection

4. Ras Connection with script

5. RAS OR DUN Connection Detection

6. How to automate Dial up connection with RAs in Windows95/98

7. Using ADSI group-membership through RAS-Connection to map groupdepending Networkdrives

8. Automating RAS connections

9. RAS-Connection - Success?

10. VPN and RAS connection

11. Detect ras connection for W2K stations

12. How to launch a RAS connection

 

 
Powered by phpBB® Forum Software