无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站广告联系 微信:wuyouceo QQ:184822951
查看: 3547|回复: 7
打印 上一主题 下一主题

批处理修改BOOT文件

[复制链接]
跳转到指定楼层
1#
发表于 2007-5-17 19:40:55 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
发现老毛桃用批处理就可以修改BOOT。INI文件,如果想在
multi(0)disk(0)rdisk(0)partition(1)\windows="microsoft windows xp professional" /noexecute=optin /fastdetect
后面加上一个参数 /usepmtimer让它变成
multi(0)disk(0)rdisk(0)partition(1)\windows="microsoft windows xp professional" /noexecute=optin /fastdetect /usepmtimer
不知道这个批处理得怎么写

谢谢
2#
发表于 2007-5-17 20:40:52 | 只看该作者
嘿嘿,倘若允许使用第三方程序的话,这是一个很简单的问题。:lol :lol :lol
回复

使用道具 举报

3#
 楼主| 发表于 2007-5-17 21:23:31 | 只看该作者
讨教:lol :lol :lol :lol
回复

使用道具 举报

4#
 楼主| 发表于 2007-5-17 23:18:11 | 只看该作者
bootcfg /addsw

然后后面的怎么写?
回复

使用道具 举报

5#
发表于 2007-5-17 23:49:42 | 只看该作者
多翻翻老帖子

@echo off
if exist boot.new del boot.new
if not exist boot.ini goto :eof
for /f "delims=" %%l in (boot.ini) do (
    echo.%%l | find /i "/fastdetect" | find /v /i "/usepmtimerl">nul && echo %%l /usepmtimer||echo %%l
)>>boot.new
attrib -s -h -r boot.ini
copy boot.new boot.ini>nul
attrib +s +h +r boot.ini
回复

使用道具 举报

6#
发表于 2007-5-18 10:14:38 | 只看该作者
原帖由 流年转换 于 2007-5-17 09:23 PM 发表
讨教:lol :lol :lol :lol

嘿嘿,我更喜欢使用后面的那个软件

1、使用 CHANGE.exe(13,520)
--------------------------------
直接运行
CHANGE.exe /i boot.ini "/fastdetect" "/fastdetect /usepmtimer"
就可以将
multi(0)disk(0)rdisk(0)partition(1)\windows="microsoft windows xp professional" /noexecute=optin /fastdetect
改为
multi(0)disk(0)rdisk(0)partition(1)\windows="microsoft windows xp professional" /noexecute=optin /fastdetect /usepmtimer

---------------------------------

2、使用 inifile.com(1,835)
---------------------------------
直接运行
inifile c:\boot.ini [operating systems] multi(0)disk(0)rdisk(0)partition(1)\windows="microsoft windows xp professional" /noexecute=optin /fastdetect /usepmtimer
就可以将
multi(0)disk(0)rdisk(0)partition(1)\windows="microsoft windows xp professional" /noexecute=optin /fastdetect
改为
multi(0)disk(0)rdisk(0)partition(1)\windows="microsoft windows xp professional" /noexecute=optin /fastdetect /usepmtimer
----------------------------------

[ 本帖最后由 不才 于 2007-5-18 10:16 AM 编辑 ]
回复

使用道具 举报

7#
 楼主| 发表于 2007-5-18 23:51:14 | 只看该作者
呵,我选择了W版主的这个版本
if not exist boot.ini echo Not found boot.ini!&goto :eof
if exist %temp%\boot.new del /f /a %temp%\boot.new
find/i "/usepmtimer" boot.ini>nul && echo Modified boot.ini! && goto :eof
for /f "delims=" %%l in (boot.ini) do (
    echo.%%l | find/i "/fastdetect" >nul && echo %%l /usepmtimer || echo %%l
)>>%temp%\boot.new
find/i "/fastdetect" %temp%\boot.new>nul 2>nul
if errorlevel 1 echo Fail to parse boot.ini!&goto :eof
attrib -s -h -r boot.ini
copy boot.ini %temp%\boot.bak>nul&&echo Pass to backup boot.ini.
copy %temp%\boot.new boot.ini>nul 2>nul
find/i "/fastdetect" boot.ini>nul 2>nul
if not errorlevel 1 echo Pass to wrtie boot.ini.
if errorlevel 1 copy %temp%\boot.bak boot.ini>nul & echo Fail to wrtie boot.ini!
attrib +s +h +r boot.ini
del %temp%\boot.new & del %temp%\boot.bak
回复

使用道具 举报

8#
 楼主| 发表于 2007-5-18 23:55:38 | 只看该作者
原帖由 阿非 于 2007-5-17 11:49 PM 发表
多翻翻老帖子

@echo off
if exist boot.new del boot.new
if not exist boot.ini goto :eof
for /f "delims=" %%l in (boot.ini) do (
    echo.%%l | find /i "/fastdetect" | find /v /i "/usepmtimer ...


谢谢,试过这个版本,发现这个版本虽然简单好多,但是它不会管你之前有没有这个想加的参数,而是直接给再加上一回,少了个判断语句
回复

使用道具 举报

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

本版积分规则

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

闽公网安备 35020302032614号

GMT+8, 2024-5-15 00:36

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

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