::特点:添加了自动获取 网络连接 代码,无需手动设置; Zl>SeTjB-
@echo off Zl>SeTjB-
title PPPoE自动连接 Zl>SeTjB-
set /p user=请输入宽带用户名: Zl>SeTjB-
set /p pass=请输入宽带密码: Zl>SeTjB-
set "NIC_flag=Ethernet" Zl>SeTjB-
for /f "tokens=1,2,3,* delims=: " %%i in ('ipconfig /all') do ( Zl>SeTjB-
if "%%i"=="%NIC_flag%" set NIC_name=%%k) Zl>SeTjB-
Rem '/*=============拨号============*/ Zl>SeTjB-
rasdial %NIC_name% %user% %pass% Zl>SeTjB-
pause>nul