|
老九PE能启动,但是把驱动包里的CMD文件加到PECMD.INI最后一行来EXEC,实际使用中,进入PE都不会运行CMD文件。
如果手动运行CMD文件,则在解压缩文件后退出,并未配置网络。
一个是通用PE的网络支持DRIVERS_NET.CAB
INFCACHEBUILD.EXE
NET.CMD
NET_PART.EXE
NET.CMD文件: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%
PUSHD %TP%
PECMD.EXE EXEC ="%TP%\Net_Part.exe"
FOR /F %%i IN ('Dir /B /A-D ^".\DRIVERS_NET*.CAB^"') DO PECMD.EXE DEVI ".\%%i"
START /Wait .\InfCacheBuild.exe %SystemRoot%
BARTPE.EXE -pnp
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
NET.EXE START EVENTLOG
ECHO 安装网络设备...
BARTPE.EXE -pnp -cn WinPE -wg WORKGROUP
ECHO 安装网络组件...
REGSVR32 /S NETCFGX.DLL
REGSVR32 /S NETSHELL.DLL
REGSVR32 /S NETMAN.DLL
BARTPE.EXE -c p -i MS_TCPIP
BARTPE.EXE -c c -i MS_MSCLIENT
BARTPE.EXE -c s -i MS_SERVER
BARTPE.EXE -c p -i MS_L2TP
BARTPE.EXE -c p -i MS_PPTP
BARTPE.EXE -c p -i MS_PPPOE
BARTPE.EXE -c p -i MS_WANARP
BARTPE.EXE -c p -i MS_NDISWAN
BARTPE.EXE -c s -i MS_RASCLI
BARTPE.EXE -c s -i MS_RASSRV
BARTPE.EXE -c s -i MS_RASMAN
BARTPE.EXE -c s -i MS_STEELHEAD
BARTPE.EXE -v -c p -i MS_NDISUIO
BARTPE.EXE -v -c s -i MS_WZCSVC
ECHO 启动网络服务...
PECMD.EXE SERV AudioSrv
NET.EXE START TCPIP
NET.EXE START DHCP
NET.EXE START NLA
NET.EXE START LMHOSTS
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 >nul
REG ADD %K%\Lanmanserver\parameters /v %W% /t REG_DWORD /d 0 /f >nul
REG ADD %K%\lanmanworkstation\parameters /v %S% /t REG_DWORD /d 0 /f >nul
REG ADD %K%\lanmanworkstation\parameters /v %W% /t REG_DWORD /d 0 /f >nul
NET.EXE START NETMAN
NET.EXE START TAPISRV
NET.EXE START RASMAN
NET.EXE START WZCSVC
DEL /Q %SystemRoot%\INF\*.PNF %SystemRoot%\INF\INFCACHE.1
DEL %USERPROFILE%\「开始」菜单\程序\网络设置\启用网络支持.lnk
PECMD.EXE REGI HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu\{208D2C60-3AEA-1069-A2D7-08002B30309D}=#0
REGSVR32 /S "%windir%\system32\stobject.dll" 1>nul
FOR /F %%i IN ([email=]'@reg[/email] query "HKEY_LOCAL_MACHINE\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
Start PENETCFG.EXE
另一个是个网吧工具盘的网络部分:
Auto.CMD
DEVCON.EXE
DRIVERS_NET.CAB
extract.exe
INFCACHEBUILD.EXE
NET_PART.cab
NET_PART.ico
AUTO.CMD文件:
@echo off
setlocal
cd /d %~dp0
EXTRACT /Y /E /L %systemroot% NET_PART.CAB
FOR /F %%i IN ('Dir /B /A-D ^".\DRIVERS_NET*.CAB^"') DO PECMD.EXE DEVI ".\%%i"
START /Wait .\InfCacheBuild.exe %SystemRoot%
BARTPE.EXE -pnp
BARTPE -pnp -cn WinPE -wg WORKGROUP
ECHO 安装网络组件...
REGSVR32 /S NETCFGX.DLL
BARTPE -c p -i MS_TCPIP
BARTPE -c c -i MS_MSCLIENT
ECHO 启动网络服务...
NET START TCPIP
NET START DHCP
PECMD.EXE LINK !%Desktop%\配置网卡,%SystemRoot%\System32\PENETCFG.exe
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
DEL /Q %SystemRoot%\INF\*.PNF %SystemRoot%\INF\INFCACHE.1 |
|