hi Matias!

One way that I can think of is running an "ipconfig /all", and piping it into a textfile (and from the script open it, and search), or alternatively pipe it to a "find" command and look for the presence of "NdisWan Adapter", which is the virtual VPN adapter. Example:

code:
SHELL '%COMSPEC% /C ipconfig /all |find /i "NdisWan" >nul' 

the KiX @ERROR level will then tell you if the string was found or not.

Another is to check for IP addresses with the help of the macro @IPADDRESSx, where "x" is the number of the card or virtual adapter, check the KiXtart documentation for more help on this. In most cases, VPN users will be assigned specific IP addresses. To check the different octets, you can use this code:

code:
 $TCPIP = @IPADDRESS1
$1octet = VAL(SUBSTR($TCPIP,1,3))
$2octet = VAL(SUBSTR($TCPIP,5,3))
$3octet = VAL(SUBSTR($TCPIP,9,3))
$4octet = VAL(SUBSTR($TCPIP,13,3))

As you can see, i've chosen adapter 2 here (adapter 0 is normally your NIC).

Also, do a search on the forum, I bet you'll find alot of useful things.

[ 03 August 2001: Message edited by: masken ]

_________________________
The tart is out there