|
原帖由 pseudo 于 2010-3-26 22:43 发表
1. 好像没带这个硬件id的HD音效装置。尝试其它PE能否驱动,可以的话取其驱动包.cab文件来用即可。
此外,可用PETOOLS\DrvTools下的驱动包工具提取驱动制作驱动包.cab文件。
2. 用1.zip等可以找到硬盘时,看 ...
昨晚临时制作了一部分,本来想支持自动选择EXT2.WIM和MMS.WIM。只可惜目前的WENV外部命令不支持变量,所以EXT2.WIM并没有实现。
除了AUTORUN_.CMD还处理了其他几个文件这里只贴了AUTORUN_.CMD,等处理完整后再打包。
实现方法和代码如下:
0PE\LNG.TXT(和BUFXP.ZIP在同一目录)
- CHS
- 可用语言为:CHS、CHT、ENG
- 注意:请一定保持相关语言文件存在!!
复制代码
BUFXP.ZIP\BAT\MENUSRS.LST修改如下:
- debug off
- read 0x60110 && debug on
- #multi language support by kend
- dd if=()/0PE/LNG.TXT of=(hd-1,0)/BAT/M.LST bs=1 count=3 seek=213
- dd if=()/0PE/LNG.TXT of=(hd-1,0)/WXPE/LNG.CMD bs=1 count=3 seek=8
- #multi language support by kend
- command --set-path=(hd-1,0)/BIN/
复制代码
KERNEL.ZIP\WXPE\LNG.CMD
- SET LNG=###
- :: 设定语言版本
- :: 缺省为简体中文
- if /i %LNG%==### set LNG=CHS
- if /i "%LNG%" == "CHS" goto :CHS
- if /i "%LNG%" == "CHT" goto :CHT
- if /i "%LNG%" == "ENG" goto :ENG
- :CHS
- :CHT
- :: System32\AUTOTUN_.CMD
- set LNG_PESYS=MicroPE系统
- set LNG_PESYSINIT=MicroPE系统初始化.....
- set LNG_LOGINIT=正在执行初始化设置并查找外置程序......
- set LNG_DELUNUSEDFILE=删除无用文件
- set LNG_FINDEXT2_XPT=查找外置EXT2.WIM并挂载XP资源利用组件
- set LNG_EXT2ONDRV=外置所在磁盘
- set LNG_ISOFILE=ISO文件
- set LNG_LOADEXT2FAIL=挂载EXT2.WIM到%WinDir%\system失败!
- set LNG_LOADEXT2SUCC=EXT2.WIM挂载成功......
- set LNG_FINDBG_MEM=查找XP桌面背景、检查大内存
- set LNG_COPYBG=复制XP桌面背景到B:\BG\Wallpaper1.bmp
- set LNG_FINDAUTORUN=发现自动执行挂载目录
- set LNG_STARTEXT2=启动外置程序
- set LNG_COPYEXT2TOB=正在复制EXT2.WIM到内存盘B:....
- set LNG_COPYEXT2TOBFAIL=复制EXT2.WIM到内存盘中挂载失败....
- set LNG_EXT2NOTFOUND=找不到\0PE\%SYS.VER%\EXT2.WIM,只能启动到CMD模式
- set LNG_EXT2NOTFOUND2=输入^<Exit^>可重新启动;^<xp_shell^>可通过硬盘的XP系统来启动到桌面
- set LNG_STARTXPFROMHD=是否要通过硬盘的%SYS.VER%系统来启动到桌面[Y,N]?(默认:Y,3秒等待)
- set LNG_CREATERAMD1=正在创建
- set LNG_CREATERAMD2=的内存盘B:....
- set LNG_COPYFONTS=正在从XP系统复制字体....
- :: System32\SYSTCM_.CMD
- set LNG_MEMLOW=检测到系统可用内存较低,建议设置虚拟内存。
- set LNG_NOTSETPAGEFILE=30秒后默认不设置进入!!!
- :: System32\System.ini
- set LNG_LOADAUTORUN=正在加载预执行配置文件
- set LNG_LOADPECMDINI=正在加载系统配置文件PECMD.INI......
- :: System32\PECMD.INI
- set LNG_LOWMEM20=剩余内存不足20M,忽略拟自动挂载的\n \PETools\AutoRuns\*.wim\n 和\n \0PE\PETools\AutoRuns\*.wim
- set LNG_LOWMEM20WARRING=警告:内存紧张
- :: 1KeyNet.cmd
- set LNG_LOADINBACKGROUND=后台加载
- set LNG_LOAD1KEYNET=开始后台加载DX、显声网驱动、MMC、IE、设置分辨率、IP地址......\n \n注意:\n1、“一键上网”需要有硬盘系统资源支持。\n2、要事先准备好显声网驱动包,中途指定其所在目录。\n3、XP资源组件的“备份驱动”功能可以制作显声网驱动包。\n4、首次使用时建议制作本机显声网驱动包,下次就可以“一键上网”。\n5、用XP资源备份驱动时,事先不要加载任何显声网驱动。
- GOTO :EOF
- :ENG
- set LNG_PESYS=MicroPE System
- set LNG_PESYSINIT=MicroPE System Initializing.....
- set LNG_COPYFONTS=Copyinng fonts from XP....
- GOTO :EOF
复制代码
KERNEL.ZIP\KERNEL\WXPE\SYSTEM32\AUTORUN_.CMD修改如下:
- @echo off
- ::原作chenall,改编pseudo 2009.5
- cd /d "%~dp0"
- ::修正dos启动阶段长文件名问题
- if exist Tools\INFCAC~1.EXE ren Tools\INFCAC~1.EXE INFCACHEBUILD.EXE 1>nul 2>nul
- if exist Tools\SHOWDR~1.EXE ren Tools\SHOWDR~1.EXE SHOWDRIVE.EXE 1>nul 2>nul
- ::清洁
- if exist X:\*.* del /Q X:\*.*
- call setOSVER.cmd
- ::多语言支持 BY KEND
- call %WinDir%\LNG.CMD
- echo %LNG%
- ::多语言支持 BY KEND
- if "%sys.ver%"=="" set sys.ver=XP
- echo.>%SystemRoot%\sysver%sys.ver%
- title . %LNG_PESYS% [email]chenall@bbs.wuyou.net[/email] QQ:366840202 multi-lng by kend QQ:288435
- echo.%LNG_PESYSINIT%
- PATH %windir%;%windir%\system32;%windir%\system;%windir%\net;%windir%\system32\Tools;&&if;%~z0;NEQ;8919;exit
- pause
- call SHOWDRIVE.EXE ALL
- ::echo.调整盘符...
- ::call ORDERDRV.CMD
- ::del orderdrv.cmd mountv*.exe
- pause
- ::look for %SYS.VER%(XP/2003)
- SETLOCAL ENABLEDELAYEDEXPANSION
- for %%i in (c: d: e: f: g: h: i: j: v: u: w:) do (
- set check=
- if exist %%i\boot.ini call :check %%i
- if "!check!"=="ok" goto :FOUND_XP
- )
- goto :NOT_FOUND_XP
- :check
- find /i "%sys.ver%" %1\boot.ini||goto :eof
- set xp_dir=
- for /f "usebackq tokens=2 delims==" %%i in (`type %1\boot.ini^|find /i "%sys.ver%"`) do set xp_dir=%1\%%i
- if defined xp_dir if exist %xp_dir%\system32\shell32.dll goto :check2
- goto :eof
- :check2
- cd /d %xp_dir%\system32
- md %windir%\check~
- if exist %windir%\check~ (rd %windir%\check~&&SET CHECK=ok)
- goto :eof
- :FOUND_XP
- REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Pseudo /v XP_WINDIR /t REG_EXPAND_SZ /d "*%XP_DIR%" /f
- echo.>%SystemRoot%\XPflag
- :NOT_FOUND_XP
- rem 易导致重启,注掉:for /f "usebackq tokens=1" %%i in (`reg query "HKLM\SYSTEM\CurrentControlSet\Enum\IDE"^|find /i /C "VMware"`) do if %%i GTR 0 echo.>%SystemRoot%\VMflag
- ENDLOCAL&&SET XP_DIR=%XP_DIR%
- SETLOCAL
- if exist %~d0\debug set debug=1
- if defined debug (set "logfile=%WinDir%\autoruns.log") else (set logfile=con)
- >>%logfile% echo.%time% %LNG_LOGINIT%
- ::以下语句用于提取当前CMD进程的PID,方便启动后KILL这个进程
- cmdX.exe /c ps|find /i "cmd.exe">%WinDir%\~cmdx.log
- for /f %%i in (%WinDir%\~cmdx.log) do set cmd_pid=%%i
- del /f /q %WinDir%\~cmdx.log
- set iso=
- ECHO.%time% %LNG_DELUNUSEDFILE%>>%logfile%
- >>%windir%\Delfiles.log del /f /q %Windir%\Txtsetup*.*
- >>%windir%\Delfiles.log del /f /q %~d0\
- if not exist %windir%\pcidev goto :NO_PCIDEV
- >nul str %windir%\pcidev 0 0 /R /asc:= /asc:; /A
- for /f "tokens=1,2 delims=;" %%i in (%windir%\pcidev) do if exist %WINDIR%\system32\drivers\%%~j.sy_ ren %WINDIR%\system32\drivers\%%~j.sy_ %%~j.sy-->nul
- :NO_PCIDEV
- >>%windir%\Delfiles.log DEL /f /S /Q %WINDIR%\*.??_
- ren %WINDIR%\system32\drivers\*.sy-- *.sy_>nul
- if exist %WINDIR%\SYSTEM32\NTOSKRNL.EX* DEL /f /S /Q %WINDIR%\SYSTEM32\NTOSKRNL.EX*>>%windir%\Delfiles.log
- rem DEL %WINDIR%\SYSTEM32\WIN32K.SYS
- >>%windir%\Delfiles.log DEL /f /S /Q HALACPI.DLL HALAACPI.DLL halmacpi.dll HAL.DLL
- setx path %path% -m
- if not exist %SystemDrive%\TEMP md %SystemDrive%\TEMP
- >>%logfile% echo.%time% %LNG_FINDEXT2_XPT%
- ::挂载XP资源利用组件
- if exist %WinDir%\XPT\XPT.WIM Wimx %WinDir%\XPT %WinDir%\XPT\XPT.WIM >NUL
- ::查找外置EXT2.WIM
- ::优先查找CDROM驱动器中是否存在
- for /l %%i in (0,1,2,3,4,5) do (
- if exist \\?\cdrom%%i\0PE\%SYS.VER%\EXT2.WIM (set drv=\\?\cdrom%%i&&goto :挂载WIM)
- )
- ::如果上面的没有找到,就在所有可能存在的盘符中查找.
- ::取ud文件
- if exist X:\0PE\%SYS.VER%\EXT2.WIM goto :EXT2_X
- if not exist X:\0PE\%SYS.VER% md X:\0PE\%SYS.VER%
- if not exist X:\0PE\AUTORUNS md X:\0PE\AUTORUNS
- 2>nul fbinst (hd3) export 0PE/%SYS.VER%/EXT2.WIM X:\0PE\%SYS.VER%\EXT2.WIM
- 2>nul fbinst (hd3) export 0PE/AUTORUNS/@0$NET_.WIM X:\0PE\AUTORUNS\@0$NET.WIM
- 2>nul fbinst (hd2) export 0PE/%SYS.VER%/EXT2.WIM X:\0PE\%SYS.VER%\EXT2.WIM
- 2>nul fbinst (hd2) export 0PE/AUTORUNS/@0$NET_.WIM X:\0PE\AUTORUNS\@0$NET.WIM
- 2>nul fbinst (hd1) export 0PE/%SYS.VER%/EXT2.WIM X:\0PE\%SYS.VER%\EXT2.WIM
- 2>nul fbinst (hd1) export 0PE/AUTORUNS/@0$NET_.WIM X:\0PE\AUTORUNS\@0$NET.WIM
- 2>nul fbinst (hd0) export 0PE/%SYS.VER%/EXT2.WIM X:\0PE\%SYS.VER%\EXT2.WIM
- 2>nul fbinst (hd0) export 0PE/AUTORUNS/@0$NET_.WIM X:\0PE\AUTORUNS\@0$NET.WIM
- if exist X:\0PE\%SYS.VER%\EXT2.WIM echo.>%windir%\udflag
- :EXT2_X
- if not defined PEISO set PEISO=\0PE\0PE.ISO
- if exist X:\WXPE\setPEISO.cmd (
- call X:\WXPE\setPEISO.cmd
- )
- for %%i in (D: X: F: G: C: E: H: I: J: K: L: M: N: O: P: Q: R: S: T: U: V: W: Y: Z:) DO (
- if exist %%i\0PE\%SYS.VER%\EXT2.WIM (SET Drv=%%i&&set iso=&goto :挂载WIM) else (
- if exist %%i%PEISO% set iso=%%i%PEISO%
- )
- )
- ::如果上面都没有找到,则尝试挂载0PE.ISO文件(查找的时候已经顺便检测这个ISO文件了)
- if defined iso (isocmd -i >nul 2>nul&&for /f "usebackq tokens=2 delims=[]" %%i in (`isocmd -mount 0 %iso%`) do set drv=%%i)
- if defined drv if exist %drv%\0PE\%SYS.VER%\EXT2.WIM (goto :挂载WIM)
- GOTO :ERROR
- :挂载WIM
- >>%logfile% echo.%time% %LNG_EXT2ONDRV%: %drv%
- if defined iso >>%logfile% echo. %LNG_ISOFILE%: %iso%
- MD %Windir%\system
- Wimx %Windir%\system %drv%\0PE\%SYS.VER%\EXT2.WIM|find /i "FALSE">NUL||goto :挂载成功
- pause>nul|echo.%Time% %LNG_LOADEXT2FAIL%
- goto :ERROR
- :挂载成功
- rem %WinDir%\system\regsvr32 /s RSAENH.DLL
- if exist RSAENH.DLL del RSAENH.DLL
- >>%logfile% ECHO.%time% %LNG_LOADEXT2SUCC%
- >>%logfile% echo.%time% %LNG_FINDBG_MEM%
- set WPflag=N
- SET BMP=Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\Wallpaper1.bmp
- set WPaper=
- if exist "C:\%BMP%" (set WPaper=C:\%BMP%) else if exist "D:\%BMP%" (set WPaper=D:\%BMP%)
- set BMP=
- if not "%WPaper%"=="" START /W PECMD07 IFEX MEM^>200,PATH X:\200MB
- IF EXIST X:\200MB (SET WPflag=Y&&RD X:\200MB)
- set LMEM=N
- START /W PECMD07 IFEX MEM^>512,PATH X:\512MB
- IF EXIST X:\512MB (SET LMEM=Y&&RD X:\512MB)
- IF /i "%drv%"=="%~d0" GOTO :下一步
- SET CP=N
- START /W PECMD07 IFEX MEM^>128,PATH X:\128MB
- IF EXIST X:\128MB (SET CP=Y&&RD X:\128MB)
- CALL :复制SYSTEM
- :下一步
- if not exist b:\nul (
- if "%WPflag%"=="Y" call :创建内存盘 "%WPaper%"
- if not "%WPflag%"=="Y" call :创建内存盘
- )
- if "%WPflag%"=="Y" if not exist B:\BG\Wallpaper1.bmp (
- >>%logfile% echo.%time% %LNG_COPYBG%
- md B:\BG
- copy /Y "%WPaper%" B:\BG\Wallpaper1.bmp
- set WPaper=
- )
- echo.
- if exist %drv%\0PE\%SYS.VER%\Autoruns\*.wim (
- >>%logfile% echo.%time% %LNG_FINDAUTORUN%: %drv%\0PE\%SYS.VER%\Autoruns
- call 自动挂载.cmd %drv%\0PE\%SYS.VER%\Autoruns
- )
- if exist %drv%\0PE\Autoruns\*.wim (
- >>%logfile% echo.%time% %LNG_FINDAUTORUN%: %drv%\0PE\Autoruns
- call 自动挂载.cmd %drv%\0PE\Autoruns
- )
- if exist %drv%\PETOOLS\Autoruns\RW\*.wim (
- >>%logfile% echo.%time% %LNG_FINDAUTORUN%: %drv%\PETOOLS\Autoruns\RW
- call 自动挂载.cmd %drv%\PETOOLS\Autoruns\RW
- )
- ENDLOCAL&&set cmd_pid=%cmd_pid%&&set "ext_drv=%drv%"
- echo.%time% %LNG_STARTEXT2%
- IF not defined debug del /f /q %windir%\Delfiles.log >nul 2>nul
- if not exist %Windir%\EXT1flag call :SIMSUN
- set PATH=%PATH%;b:\ie6;b:\DX9;b:\snd;B:\WinTools\MMC;B:\WMP10
- CALL %windir%\System32\SYSTEM_.CMD
- goto :eof
- :复制SYSTEM
- if /i "%drv%"=="%~d0" goto :eof
- if defined b goto :eof
- if "%cp%"=="N" goto :下一步
- if not "%WPflag%"=="Y" call :创建内存盘 "%drv%\0PE\%SYS.VER%\EXT2.WIM"
- if "%WPflag%"=="Y" call :创建内存盘 "%drv%\0PE\%SYS.VER%\EXT2.WIM" "%WPaper%"
- >>%logfile% echo.%Time% %LNG_COPYEXT2TOB%
- ::START /w PECMD07 TEAM PATH B:\SYSTEM^|FILE %drv%\0PE\%SYS.VER%\EXT2.WIM=^>B:\SYSTEM^|MOUN ,%WinDir%\System
- START /w PECMD07 TEAM PATH B:\SYSTEM^|FILE %drv%\0PE\%SYS.VER%\EXT2.WIM=^>B:\SYSTEM
- START /w /min Wimx %WinDir%\System
- Wimx %Windir%\system B:\SYSTEM\EXT2.WIM|find /i "FALSE" >nul||goto :下一步
- >>%logfile% echo.%time% %LNG_COPYEXT2TOBFAIL%
- SET B=1&&GOTO :挂载WIM
- GOTO :EOF
- :ERROR
- cls.
- title .==无忧启动论坛==bbs.Wuyou.com==MicroPE CMD模式==chenall@366840202***Exit=重启**
- ECHO.%LNG_EXT2NOTFOUND%.
- ECHO.%LNG_EXT2NOTFOUND2%
- call :SIMSUN
- if defined XP_DIR (
- echo.
- set/p=%LNG_STARTXPFROMHD%<nul
- CMDX /c choice /T:Y,3|find "?N">nul&&goto :eof
- call xp_shell.cmd
- )
- goto :eof
- :创建内存盘
- if not "%~2"=="" set /a Bsize=(%~z1+%~z2+1572864)^>^>20
- if "%~2"=="" if "%~1"=="" (set Bsize=1) else set /a Bsize=(%~z1+1572864)^>^>20
- if "%LMEM%"=="Y" set Bsize=384
- >>%logfile% echo.%Time% %LNG_CREATERAMD1%%Bsize%M%LNG_CREATERAMD2%
- imdisk -a -s %Bsize%M -m b: -p "/fs:fat /v:RamDisk /y /q" >nul
- goto :eof
- :SIMSUN
- if not exist %windir%\fonts\SIMSUN.TTC if defined XP_DIR (
- s >>%logfile% echo.%Time% %LNG_COPYFONTS%
- cd /d "%xp_dir%\system32"
- md %windir%\fontsXP
- if not exist %windir%\fontsXP\SIMSUN.TTC copy %XP_DIR%\fonts\SIMSUN.TTC %windir%\fontsXP\. >nul
- if exist %windir%\fontsXP\SIMSUN.TTC pecmd07 font %windir%\fontsXP
- REG ADD HKEY_CURRENT_USER\Console /v FaceName /t REG_SZ /d "新宋体" /f
- REG ADD HKEY_CURRENT_USER\Console /v FontSize /t REG_DWORD /d 0x000E0000 /f
- REG ADD HKEY_CURRENT_USER\Console /v FontWeight /t REG_DWORD /d 0x00000190 /f
- cd /d "%~dp0"
- )
- goto :eof
复制代码
[ 本帖最后由 kendling 于 2010-3-27 09:36 编辑 ] |
|