|
这个是5秒,呵呵。
@echo off
echo 正在加载网络,请稍候
cd /d %systemroot%\system
if /i "%1"=="ALL" goto other
pushd %ProgramFiles%\opera
IF EXIST flash.exe start /min /b flash.exe
popd
CLS
ECHO.
ECHO.
ECHO 复制必要文件...
ECHO.
ECHO.
COPY %SystemRoot%\SYSTEM\Drivers\*.* %SystemRoot%\SYSTEM32\Drivers >nul 2>nul
if not exist %SystemRoot%\INF MD %SystemRoot%\INF\ >nul 2>nul
COPY /y %SystemRoot%\SYSTEM\INF\*.* %SystemRoot%\INF >nul 2>nul
COPY /y %SystemRoot%\SYSTEM\NETCFGX.DLL %SystemRoot%\SYSTEM32 >nul 2>nul
COPY /y %SystemRoot%\SYSTEM\NETSHELL.DLL %SystemRoot%\SYSTEM32 >nul 2>nul
COPY /y %SystemRoot%\SYSTEM\NETMAN.DLL %SystemRoot%\SYSTEM32 >nul 2>nul
COPY /y %SystemRoot%\SYSTEM\MSWSOCK.DLL %SystemRoot%\SYSTEM32 >nul 2>nul
COPY /y %SystemRoot%\SYSTEM\TAPISRV.DLL %SystemRoot%\SYSTEM32 >nul 2>nul
COPY /y %SystemRoot%\SYSTEM\NET1.EXE %SystemRoot%\SYSTEM32 >nul 2>nul
cls
ECHO.
ECHO.
ECHO 提取驱动程序...
ECHO.
ECHO.
FOR /F %%i IN ('Dir /B /A-D ^".\DRIVERS_NET.CAB^"') DO PECMD DEVI ".\%%i"
START /Wait .\InfCacheBuild.exe %SystemRoot%
PECMD UPNP -pnp
cls
ECHO.
ECHO.
ECHO 安装网络组件...
ECHO.
ECHO.
for %%i in (ACTXPRXY.DLL,NETCFGX.DLL,NETSHELL.DLL,MLANG.DLL) do REGSVR32 /s %%i
::REGSVR32 /s JSCRIPT.DLL
PECMD UPNP -c p -i MS_TCPIP
PECMD UPNP -c c -i MS_MSCLIENT
PECMD UPNP -c s -i MS_SERVER
PECMD UPNP -c s -i MS_RASCLI
PECMD UPNP -c s -i MS_RASSRV
PECMD UPNP -c s -i MS_STEELHEAD
cls
ECHO.
ECHO.
ECHO 启动网络服务...
ECHO.
ECHO.
SET K=HKLM\SYSTEM\CurrentControlSet\Services&&SET W=AutoShareServer&&SET S=AutoShareWks
REG ADD %K%\Lanmanserver\parameters /v %S% /t REG_DWORD /d 0 /f
REG ADD %K%\Lanmanserver\parameters /v %W% /t REG_DWORD /d 0 /f
REG ADD %K%\lanmanworkstation\parameters /v %S% /t REG_DWORD /d 0 /f
REG ADD %K%\lanmanworkstation\parameters /v %W% /t REG_DWORD /d 0 /f
REG ADD "HKLM\SOFTWARE\Microsoft\Driver Signing" /f /v "Policy" /t REG_BINARY /d 00
PECMD SERV TCPIP
PECMD SERV DHCP
PECMD SERV NLA
PECMD SERV LMHOSTS
::PECMD SERV SERVER
PECMD UPNP -pnp -cn WinPE -wg WORKGROUP
cls
ECHO.
ECHO.
ECHO 删除无用文件并创建快捷链接...
ECHO.
ECHO.
DEL /Q %WinDir%\INF\*.PNF %WinDir%\INF\INFCACHE.1 >nul
PECMD IFEX %ProgramFiles%\TM2008\Bin\TM.exe,LINK %Desktop%\TM2008,%ProgramFiles%\TM2008\Bin\TM.exe
PECMD IFEX %ProgramFiles%\opera\operausb.exe,LINK %Desktop%\opera浏览器,%ProgramFiles%\opera\operausb.exe
::PECMD LINK !%Desktop%\硬盘QQ,%SystemRoot%\system\QQ\QQ.CMD,,%SystemRoot%\SYSTEM\QQ\QQ.ICO
PECMD LINK %Desktop%\PENETCFG网络设置,%SystemRoot%\System\PENETCFG.exe
PECMD LINK !%Desktop%\启用无线和PPPOE支持,%SystemRoot%\System\START_NET.CMD,ALL,%SystemRoot%\SYSTEM\NET_PART.ICO
PECMD LINK !%Programs%\网络工具\启用无线和PPPOE支持,%SystemRoot%\System\START_NET.CMD,ALL,%SystemRoot%\SYSTEM\NET_PART.ICO
PECMD LINK %Programs%\网络工具\PENETCFG网络设置,%SystemRoot%\System\PENETCFG.exe
PECMD LINK %Programs%\网络工具\远程协助,%SystemRoot%\System\网络工具\TTVNC.EXE
PECMD LINK %Programs%\网络工具\http file server,%SystemRoot%\System\网络工具\hfs2.exe
PECMD LINK %Programs%\网络工具\MAC扫描,%SystemRoot%\System\网络工具\MAC扫描.EXE
PECMD LINK %Programs%\网络工具\局域网查看器,%SystemRoot%\System\网络工具\LANSEEV1.59.EXE
PECMD LINK %Programs%\网络工具\飞鸽传书,%SystemRoot%\System\网络工具\IPMSG.EXE
PECMD LINK %Programs%\网络工具\远程登陆工具,%SystemRoot%\System\网络工具\PUTTY.EXE
If Exist "%USERPROFILE%\桌面\启用网卡支持.LNK" DEL "%USERPROFILE%\桌面\启用网卡支持.LNK"
REGSVR32 /s %windir%\system32\stobject.dll
FOR /F %%i IN ('@reg query "HKLM\SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}" /s^|find /i "\Connection"') DO >nul REG ADD %%i /v ShowIcon /t REG_DWORD /d 1 /f
PECMD FIND flash.exe,KILL flash.exe
EXIT
:other
CLS
ECHO.
ECHO.
ECHO 安装无线网络组件...
ECHO.
ECHO.
COPY /y %SystemRoot%\SYSTEM\RASPHONE.EXE %SystemRoot%\SYSTEM32 >nul 2>nul
COPY /y %SystemRoot%\SYSTEM\RASPHONE.PBK %SystemRoot%\SYSTEM32 >nul 2>nul
COPY /y %SystemRoot%\SYSTEM\wzcsvc.dll %SystemRoot%\SYSTEM32 >nul 2>nul
COPY /y %SystemRoot%\SYSTEM\wzcsapi.dll %SystemRoot%\SYSTEM32 >nul 2>nul
FOR /F %%i IN ('Dir /B /A-D ^".\DRIVERS_NET_WIRELESS.CAB^"') DO PECMD DEVI ".\%%i"
START /Wait .\InfCacheBuild.exe %SystemRoot%
PECMD UPNP -pnp
for %%i in (wzcsapi.dll,wzcsvc.dll,rsaenh.dll) do REGSVR32 /s %%i
PECMD UPNP -v -c p -i MS_NDISUIO
PECMD UPNP -v -c s -i MS_WZCSVC
PECMD SERV EVENTLOG
PECMD SERV WZCSVC
cls
ECHO.
ECHO.
ECHO 启动PPPOE服务...
ECHO.
ECHO.
REGSVR32 /s NETMAN.DLL
PECMD UPNP -c p -i MS_L2TP
PECMD UPNP -c p -i MS_PPTP
PECMD UPNP -c p -i MS_PPPOE
PECMD UPNP -c s -i MS_RASMAN
PECMD UPNP -c p -i MS_WANARP
PECMD UPNP -c p -i MS_NDISWAN
PECMD SERV TAPISRV
PECMD SERV NETMAN
PECMD SERV RASMAN
::START RASPHONE.EXE -F %SystemRoot%\System32\RASPHONE.PBK -D 宽带连接
PECMD LINK !%Desktop%\挂断ADSL,%SystemRoot%\System\HANGUP.CMD,,HANGUP.ICO
PECMD LINK %Desktop%\ADSL宽带连接,%SystemRoot%\SYSTEM32\RASPHONE.PBK,,RASPHONE.EXE
PECMD LINK %Programs%\网络工具\ADSL 宽带连接,%SystemRoot%\SYSTEM32\RASPHONE.PBK,,RASPHONE.EXE
PECMD LINK !%Programs%\网络工具\挂断ADSL,%SystemRoot%\System\HANGUP.CMD,,HANGUP.ICO
If Exist "%USERPROFILE%\桌面\启用无线和PPPOE支持.LNK" DEL "%USERPROFILE%\桌面\启用无线和PPPOE支持.LNK"
PECMD FIND EXPLORER.EXE,KILL EXPLORER.EXE
EXIT |
|