获取本机的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
posted @ 2015-04-07 16:34  阳光温暖了心情  阅读(858)  评论(0编辑  收藏  举报