1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Detect Lan Connection

Discussion in 'T&T - Functions' started by Joe Caverly, Jul 28, 2010.

  1. Joe Caverly

    Aug 28, 2009
    Likes Received:
    No computer connected to the Internet, or any other TCP/IP compliant network, can identify itself as


    echo %@if[%_ip eq,0,1]

    function IsLan=`%@if[%_ip eq,0,1]`

    echo %@IsLan[]

    If @IsLan[] returns a 0, then you have no Lan connection.

    If @IsLan[] returns a 1, then you have a Lan connection.

    You can test this by issuing the IPCONFIG /release command to release the IP address for your adapter, and the IPCONFIG /renew command to renew the IP address for your adapter. (tested on XP).


Share This Page