找回密码
 注册
搜索
系统gho:最纯净好用系统下载站投放广告、加入VIP会员,请联系 微信:wuyouceo
查看: 4799|回复: 3

用批处理如何修改BOOT.INI内的内容

[复制链接]
发表于 2008-2-27 19:36:14 | 显示全部楼层 |阅读模式
我想把   default=multi(0)disk(0)rdisk(0)partition(1)\windows
改成       default=grldr
别的内容不变.请问用批处理如何实现
发表于 2008-2-27 21:07:13 | 显示全部楼层
嘿嘿,翻翻旧帖,有讨论过滴。
回复

使用道具 举报

发表于 2008-2-27 21:39:16 | 显示全部楼层
首先去BOOT的只读属性.
edit boot.ini

[ 本帖最后由 haiou327 于 2008-2-27 10:38 PM 编辑 ]
回复

使用道具 举报

 楼主| 发表于 2008-2-28 17:05:46 | 显示全部楼层
谢谢楼上的二位。
现在已经解决,
现在是把  default=multi(0)disk(0)rdisk(0)partition(1)\windows
改写成了  default=c:\phldr


偶的代码:
@echo off

if not exist c:\boot.ini goto :eof
attrib -s -h -r c:\boot.ini
if exist c:\boot.bak del c:\boot.bak  2> nul
if exist c:\boot.new del c:\boot.new  2> nul
copy c:\boot.ini c:\boot.bak


for /f "delims=" %%l in (c:\boot.ini) do (
    echo.%%l | find/i "default=multi(0)disk(0)rdisk(0)partition(1)\windows">nul && echo default=c:\phldr||echo %%l
)>>c:\boot.new
attrib -s -h -r c:\boot.ini
copy c:\boot.new c:\boot.ini>nul
attrib +s +h +r c:\boot.ini
del c:\boot.new
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1|闽公网安备35020302032614号 )

GMT+8, 2026-3-18 05:55

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

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