|
我查看了你的注册表,AFD服务是好的,问题不在这里,可能与注册DLL及下面蓝色服务有关。重新贴一下CMD:
@echo off
PECMD TEXT 正在加载网卡驱动. 请稍候 ......L189 T180 $24
SET Var0=%0
::IF '^%Var0:~0,1%'=='^"' SET Var0=%Var0:~1,-1%
FOR /f "delims=" %%I in ("%Var0%") do Set TP=%%~dpI
SET TP=%TP:~0,-1%
CD /D %TP%
7z.exe x NET_PART.7z -y -aos -o"%WinDir%"
7z.exe x system32.7z -y -aos -o"%WinDir%\system32"
IF EXIST A:\NET.CAB PECMD.EXE DEVI A:\NET.CAB
FOR /F %%i IN ('Dir /B /A-D ^"%TP%\DRIVERS_NET*.CAB^"') DO PECMD.EXE DEVI "%TP%\%%i"
START /Wait %TP%\InfCacheBuild.exe %SystemRoot%
PECMD.EXE UPNP -pnp
NET START EVENTLOG
PECMD.EXE UPNP -pnp -cn WinPE%RANDOM% -wg WORKGROUP
REGSVR32 /S RSAENH.DLL
REGSVR32 /S NETCFGX.DLL
REGSVR32 /S NETSHELL.DLL
REGSVR32 /S NETMAN.DLL
REGSVR32 /S HNETCFG.DLL
PECMD.EXE UPNP -c p -i MS_TCPIP
PECMD.EXE UPNP -c c -i MS_MSCLIENT
PECMD.EXE UPNP -c s -i MS_SERVER
NET START DHCP
::NET START TCPIP
NET START NLA
NET START LMHOSTS
NET START RpcLocator
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
NET START SERVER
DEL /Q %SystemRoot%\INF\*.PNF %SystemRoot%\INF\INFCACHE.1
::reg add "HKLM\SYSTEM\CurrentControlSet\Services\afd" /v ImagePath /t REG_EXPAND_SZ /D "%windir%\System32\DRIVERS\afd.sys" /f >nul
PECMD.EXE EXEC @REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /va /f
PECMD.EXE EXEC @REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /va /f
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.EXE LINK %USERPROFILE%\桌面\PENETCFG网络设置,%SystemRoot%\System32\PENETCFG.exe
::START PENETCFG.EXE
::PECMD.EXE HOME www.baidu.com
net user guest /active:yes
IF EXIST A:\SERV_SET.bat call A:\SERV_SET.bat
IF NOT "%PXE_SERVER%"=="WINPE" GOTO :GETSER
ECHO.|NET USE t: \\WINPE\PEROOT0 /user:guest /persistent:no
GOTO :LINK
:GETSER
echo.
NBTSTAT -N >nul || GOTO :网卡错误
call :映射网络磁盘
goto :END
:获取DHCP服务器IP
wntipcfg /all /batch %temp%\ser_ip.txt
for /f "usebackq tokens=2 delims=:" %%i in (`find /i "DHCP Server" %TEMP%\ser_ip.txt`) do set PXE_SERVER=%%i
set PXE_SERVER=%PXE_SERVER:~1%
goto :EOF
:网卡错误
echo.
ECHO.启动网络时出现一个错误!
echo.
echo. 网卡不能正常初始化,请确认网卡驱动安装正常......
echo.
echo.请安装好网卡驱动后再次运行本程序: [%~nx0] ]
echo.
pause
goto :END
:映射网络磁盘
setlocal
IF EXIST A:\SERV_SET.bat call A:\SERV_SET.bat
if not defined PXE_SERVER call :获取DHCP服务器IP
if not defined SHARE_NAME set SHARE_NAME=tftp
if not defined SHARE_USER set SHARE_USER=Guest
if not defined SHARE_PASS set SHARE_PASS=""
::等待网络运行正常.
echo.%time% 等待网络连接并映射网络共享\\%PXE_SERVER%\%SHARE_NAME%为Z:
:wait
if "%n%"=="10" goto :NOSERVER
ping -n 1 -w 1000 %PXE_SERVER% >nul && goto :map
set/an+=1 >nul
goto :wait
:NOSERVER
echo.网络可能连接不正常或服务器有防火墙,准备强制进行连接,有可能会发生错误......
echo.%TIME% 网络映射失败: net use Z: \\%PXE_SERVER%\%SHARE_NAME% %SHARE_PASS% /user:%SHARE_USER%
goto :LINK
:map
net use Z: \\%PXE_SERVER%\%SHARE_NAME% %SHARE_PASS% /user:%SHARE_USER% >NUL 2>NUL || net use Z: \\%PXE_SERVER%\%SHARE_NAME% %SHARE_PASS% /user:%SHARE_USER%@%COMPUTERNAME% >NUL 2>NUL || (pause>nul|ECHO.%TIME% 网络映射失败: net use Z: \\%PXE_SERVER%\%SHARE_NAME% %SHARE_PASS% /user:%SHARE_USER%)
pecmd wait 2000
if not exist z:\nul goto :map
endlocal&&echo.已映射网络共享\\%PXE_SERVER%\%SHARE_NAME%为Z:盘
:LINK
START PECMD.EXE LOAD %TP%\LOADST.IC_
START PECMD.EXE LOAD %WINDIR%\SYSTEM32\PETOOLS.INI
PECMD FIND Explorer.EXE,KILL EXPLORER.EXE
:end
REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /va /f >nul 2>nul
REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /va /f >nul 2>nul
:EOF
EXIT
[ 本帖最后由 zhaohj 于 2010-7-30 10:57 编辑 ] |
|