找回密码
 注册
搜索
[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
查看: 31640|回复: 7

[系统相关] [已解决]xp系统/win7 64系统,bat如何实现自动安装pe系统?

[复制链接]
发表于 2012-11-15 22:55:54 | 显示全部楼层 |阅读模式
本帖最后由 ygqiang 于 2015-1-21 19:00 编辑

[已解决]xp系统/win7 64系统,bat如何实现自动安装pe系统?

1、可以安装到xp系统的启动菜单上
2、开机,在xp系统启动菜单上,选择进入这个类似pe的软件后,自带ghost软件
3、可以配合bat批处理命令,自动安装到xp系统的启动菜单栏上(这样就不需要鼠标点击  很多次,才能安装上)



我需要的是:

xp系统桌面上,运行1个bat批处理命令,就自动/后台/静默给xp启动菜单(刚开机显示的菜单)安装dos/pe入口。

最好这个dos/pe能集成ghost.exe不同的版本。这样就可以开机选择进入dos/pe,运行ghost.exe备份、还原系统分区。

喜欢这种配合1个bat批处理命令,就能自动安装完的dos/pe软件(后台安装,不需鼠标一直点击)。
dos/pe文件,体积别太大,10M左右就行。

xp系统下,是否有这种支持bat批处理的  dos/pe软件?多谢了
 楼主| 发表于 2012-11-15 23:31:17 | 显示全部楼层
我需要的是:xp系统桌面状态下,自动安装(配合bat批处理命令)类似pe系统的软件到开机xp启动菜单上。
发表于 2012-11-16 12:15:20 | 显示全部楼层
类,MAXDOS?
 楼主| 发表于 2012-11-19 11:55:10 | 显示全部楼层
本帖最后由 ygqiang 于 2012-11-19 13:47 编辑
类,MAXDOS?
nameyu8023 发表于 2012-11-16 12:15



我需要的是:

xp系统桌面上,运行1个bat批处理命令,就自动/后台/静默给xp启动菜单(刚开机显示的菜单)安装dos/pe入口。

最好这个dos/pe能集成ghost.exe不同的版本。这样就可以开机选择进入dos/pe,运行ghost.exe备份、还原系统分区。

喜欢这种配合1个bat批处理命令,就能自动安装完的dos/pe软件(后台安装,不需鼠标一直点击)。
dos/pe文件,体积别太大,10M左右就行。

xp系统下,是否有这种支持bat批处理的  dos/pe软件?多谢了
发表于 2012-11-19 15:01:23 | 显示全部楼层
自己去搜索吧。“直接安装到硬盘的WinPE!通用PE工具箱”。
 楼主| 发表于 2012-11-19 16:37:09 | 显示全部楼层
自己去搜索吧。“直接安装到硬盘的WinPE!通用PE工具箱”。
Heykuz 发表于 2012-11-19 15:01



    喜欢这种配合1个bat批处理命令,就能自动安装完的dos/pe软件(后台安装,不需鼠标一直点击)。
dos/pe文件,体积别太大,10M左右就行。

xp系统下,是否有这种支持bat批处理的  dos/pe软件?多谢了
 楼主| 发表于 2014-12-17 00:30:09 | 显示全部楼层
???????????????????????
 楼主| 发表于 2015-1-21 18:59:00 | 显示全部楼层
最终解决。。。
  1. ——————————————————————————————————————————————————————————
  2. if not exist c:\boot.ini goto :bootmgr


  3. ———————————————————————————————
  4. :ntldr

  5. set timeout=3
  6. set "rar=%ProgramFiles%\WinRAR\WinRAR.exe"

  7. bootcfg /timeout %timeout% >nul 2>nul
  8. attrib -s -r -h c:\boot.ini

  9. 1%windir%\system32\NOTEPAD.EXE c:\boot.ini

  10. echo. >>c:\boot.ini

  11. findstr /c:"WDOS工具箱" c:\boot.ini >nul || >>c:\boot.ini echo C:\wzldr="WDOS工具箱"
  12. findstr /c:"通用 PE 工具箱" c:\boot.ini >nul || >>c:\boot.ini echo C:\WXPE\PELOAD=通用 PE 工具箱

  13. if not exist c:\WZBOOT "%rar%" x -y "WDOS工具箱.rar" c:\
  14. if not exist c:\PETools "%rar%" x -y "通用 PE 工具箱.rar" c:\

  15. attrib +s +r +h c:\boot.ini


  16. ———————————————————————————————
  17. :bootmgr
  18. if exist "C:\Program Files (x86)" call :通用PE工具箱5.0-win7-64

  19. xxxxxx
  20. xxxxx
  21. xx
  22. exit



  23. :通用PE工具箱5.0-win7-64
  24. setlocal enabledelayedexpansion

  25. set tim=3
  26. set descri="通用PE工具箱5.0"
  27. set "bcdedit=%SystemRoot%\System32\bcdedit.exe"
  28. set "rar=C:\Program Files (x86)\WinRAR\WinRAR.exe"

  29. if not exist c:\8888 "%rar%" x -y "通用PE工具箱5.0.rar" c:\

  30. echo %bcdedit%
  31. %bcdedit% /v >list.txt
  32. %bcdedit% /enum >list1.txt

  33. %bcdedit% /timeout %tim%




  34. echo,赋值初始行指针
  35. set /a "nLine=0"
  36. echo,&echo,

  37. echo,查找符合条件总共有多少个节点
  38. set /a "nCount=0"
  39. for /f "delims=" %%i in ('findstr /i /r "通用.*PE" list.txt') do set /a "nCount+=1"
  40. echo,总共有 !nCount! 个节点符合要求
  41. echo,&echo,

  42. echo,设置查找次数标记
  43. set /a "nIndex=0"
  44. echo,&echo,

  45. :_start
  46. set /a "nIndex+=1"
  47. set "strID!nIndex!="
  48. for /f "tokens=1,2* delims=: " %%i in ('^(more +!nLine! list.txt^) ^| findstr /n /r "通用.*PE"') do (
  49.         set /a "desLine=nLine+%%i"
  50.         echo,当前发现符合条件描述在 : !desLine! 行
  51.         set /a "nLine=desLine"
  52.         echo,查到目标,更新行指针为 : !nLine!
  53.         echo,完整描述内容为         : %%k
  54.         echo,&echo,

  55.         echo,从描述行前推4行,作为more的传入参数,作单循环处理便可查询当前节点的标识符
  56.         set /a "desLine-=4"
  57.         if !desLine! LSS 0 set /a "desLine=0"
  58.        
  59.         for /f "tokens=1,*" %%a in ('^(more +!desLine! list.txt^)^|findstr /i /r "标识符"') do (
  60.                 echo,查询当前节点的标识符为 : %%b
  61.                 set "strID!nIndex!=%%b"
  62.                 goto :next
  63.         )
  64. )
  65. :next
  66. if !nIndex! LEQ !nCount! (
  67.         echo,现在你已经得到标识符了,它存于变量strID!nIndex!里面,如果为空,则无符合条件
  68.         call echo,strID!nIndex!值 : %%strID!nIndex!%%
  69.         echo,==========================================&echo,&echo,
  70.        
  71.         REM 做你要做的事情
  72.         REM Code here...
  73.         REM 要做的事情结束       
  74.         call %bcdedit% /delete %%strID!nIndex!%%

  75.         set /a "nLine+=1"
  76.         echo,现在将行指针下移一行,继续开始查找符合条件项
  77.         echo,新的行指针为 : !nLine!
  78. )

  79. if !nIndex! LEQ !nCount! goto :_start





  80. %bcdedit% /v >list2.txt


  81. :creatt

  82. %bcdedit% /create {777778af-66c9-4ad4-a54e-d76256db09e1} /application bootsector /d %descri%
  83. %bcdedit% /set {777778af-66c9-4ad4-a54e-d76256db09e1} device partition=C:
  84. %bcdedit% /set {777778af-66c9-4ad4-a54e-d76256db09e1} path \8888\PELOAD
  85. %bcdedit% /displayorder {777778af-66c9-4ad4-a54e-d76256db09e1} /addlast

  86. %bcdedit% /v >list3.txt

  87. cls
  88. ping 127.0.0.1 -n 1 >nul 2>nul
  89. del /f /q list*.txt

  90. 1pause&goto :EOF
复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|批处理之家 ( 渝ICP备10000708号 )

GMT+8, 2026-3-19 19:02 , Processed in 0.019311 second(s), 8 queries , File On.

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表