|
原帖由 uepon 于 2008-2-16 01:37 PM 发表
ntdetect.com
这个VISTA里有吗?
没有
修改了下小小强的
-
- @echo off
- SET TP=%~dp0
- SET TP=%TP:~0,-1%
- SET BAKPATH=%SYSTEMDRIVE%\BOOT\BCDBAK.BAK
- SET INFO=WinPe工具箱
- SET MBRP=\NTLDR
- SET LDRP=C:\ZJQPE
- color 2f
- IF NOT EXIST "C:\boot\BCD" (
- cls
- echo.
- echo.
- echo 文件C:\boot\BCD不存在,你没有安装Vista,程序无法继续。
- echo 按任意键退出。。。。。。
- echo.
- pause>nul
- goto end
- )
- cd /d "%TP%"
- :install
- cls
- echo 安装PE引导环境到Windows Vista
- echo.
- echo ===========================================================
- echo 即将进行安装,按任意键继续
- pause>nul 2>nul
- bcdedit.exe /enum all | find "%MBRP%" && goto installed
- IF NOT EXIST "%BAKPATH%" start /wait bcdedit.exe /export "%BAKPATH%"
- for /f "tokens=2 delims={}" %%i in ('bcdedit.exe /create /d "%INFO%" /application bootsector') do SET CLASSID=%%i
- IF "%CLASSID%"=="" GOTO createerr
- SET CLASSID={%CLASSID%}
- ECHO %CLASSID%>%SYSTEMDRIVE%\BOOT\CLASSID_BK.INI
- bcdedit.exe /set %CLASSID% device boot >nul
- bcdedit.exe /set %CLASSID% path %MBRP% >nul
- bcdedit.exe /displayorder %CLASSID% /addlast >nul
- bcdedit.exe /timeout 3 >nul
- attrib +h +s +r %LDRP% >nul 2>nul
- echo.
- echo 安装完成,按任意键退出。。。。。。
- echo.
- pause>nul 2>nul
- goto end
-
- :installed
- echo.
- echo 本机已经安装过PE,请先卸载!按任意键进行卸载,关闭退出
- pause>nul
- for /f %%i in (%SYSTEMDRIVE%\BOOT\CLASSID_BK.INI) do set CID=%%i
- bcdedit /delete %CID%
- goto install
-
- :createerr
- echo.
- echo 创建BCD项错误,安装无法继续!
- echo 按任意键退出。。。。。。
- echo.
- pause>nul
- goto end
-
- :end
- echo on
- exit
复制代码 |
|