~ Network Info ~

Discussion in 'Scripting' started by Dos_Probie, Sep 24, 2012.

  1. Dos_Probie

    Dos_Probie MDL Senior Member

    Jul 18, 2012
    250
    84
    10
    #1 Dos_Probie, Sep 24, 2012
    Last edited by a moderator: Apr 20, 2017
    Here's a batch file that gives you basic Network Information for Win7..:D



    Code:
    @echo off&color e
    SETLOCAL ENABLEEXTENSIONS
    title,==NETWORK INFORMATION!==DOS_PROBIE 2012
    :: ISP Domain
    for /f "tokens=2 delims=:" %%# In ('IPConfig /all^|Find "DNS Suffix Search List"') Do (
    for %%$ In (%%#) Do Set ISPDomain=%%$) 
    echo=Your ISP Domain Is: %ISPDomain% 
    echo.
    :: IP Address
    for /f "tokens=2 delims=:" %%# In ('IPConfig^|Find "IPv4"') Do ( 
    Call :Addy %%#) 
    :Addy 
    Set IP=%1 
    Echo=Your IP Address Is: %IP%
    echo.
    :: Network Profile Name
    for /f "delims=" %%a in ('reg query "HKEY_LOCAL_MACHINE\software\microsoft\windows nt\currentversion\networklist\Profiles" ^| FIND "{"') do set var=%%~nxa&goto :gotit
    :gotit
    for /f "tokens=2,*" %%b in ('reg query "HKEY_LOCAL_MACHINE\software\microsoft\windows nt\currentversion\networklist\Profiles\%var%" ^| FIND "ProfileName"') do echo Your Active Profile Name Is: %%%c
    echo.
    echo.
    pause>nul
    exit