获取本机的IP地址(局域网)与主机名称

编写内容保存为bat

@echo off &setlocal enabledelayedexpansion
Rem '/*========获取本机的IP地址(局域网)=========*/
echo "please wait"
for /f "tokens=2 delims=:" %%b in ('ipconfig^|find /i "ip"') do set fsip=%%b
echo %fsip%

set CT=%computername%
echo %CT%
pause

你可能感兴趣的:(IP地址)