@ECHO OFF
PUSHD %~dp0
IF NOT EXIST %WinDir%\System32\NEWDEV.DLL GOTO ERR
IF NOT EXIST %WinDir%\System32\PENetCfg.exe ..\7z\7z.exe x NET_PART.7z -y -aos -o"%WinDir%"
IF '%1'=='' FOR /F %%i IN ('Dir /B /A-D ^".\DRIVERS_NET*.CAB^"') DO PECMD.EXE DEVI ".\%%i"
IF '%1'=='MAOTAO' FOR /F %%i IN ('Dir /B /A-D ^".\MAOTAO_NET*.CAB^"') DO PECMD.EXE DEVI ".\%%i"
NET START SERVER
NET START NETMAN
NET START TAPISRV
NET START RASMAN
NET START WZCSVC
DEL /Q %WinDir%\INF\*.PNF %WinDir%\INF\INFCACHE.1
PECMD.EXE LINK !%USERPROFILE%\「开始」菜单\程序\硬件安装\网络\ADSL 宽带连接,%WinDir%\SYSTEM32\RASPHONE.PBK
PECMD.EXE LINK !%USERPROFILE%\「开始」菜单\程序\硬件安装\网络\挂断ADSL,%WinDir%\System32\HANGUP.CMD,,HANGUP.ICO
PECMD.EXE LINK !%USERPROFILE%\「开始」菜单\程序\硬件安装\网络\PENETCFG网络设置,%WinDir%\System32\PENETCFG.exe
If Exist "%USERPROFILE%\桌面\启用网络支持(DPS).LNK" DEL "%USERPROFILE%\桌面\启用网络支持(DPS).LNK"
If Exist "%USERPROFILE%\桌面\启用网络支持(911原版).LNK" DEL "%USERPROFILE%\桌面\启用网络支持(911原版).LNK"
:END
EXIT
:ERR
@ECHO OFF
CLS
ECHO 没有安装基本运行库,请先安装......
PAUSE
ECHO ON