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