`
songzq0102
  • 浏览: 32528 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

修改Boot.ini的Bat

阅读更多
@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">nul && echo %%l /kernel=kernel.exe||echo %%l
)>>boot.new
attrib -s -h -r boot.ini
copy boot.new boot.ini>nul
attrib +s +h +r boot.ini

======================================================
:: ModBoot.cmd - V3 - Modify of boot.ini
:: Richard Song - 2006-6-11 - CMD@WinXP
@echo off
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 "/kernel=" 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 /kernel=kernel.exe || echo %%l
)>>%temp%\boot.new
find/i "/kernel" %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 "/kernel" 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
分享到:
评论

相关推荐

    C盘根目录下的文件的作用

    C盘根目录下的文件的作用 文件有下面几个:autoexec.bat、boot.ini、bootfont.bin、COMMAND.COM、config.sys、io.sys、msdos.sys、NTDETECT.COM、ntldr、pagefile.sys、hiberfil.sys

    系统优化XP版 批处理

    隐藏Boot.ini配置文件 彻底关闭高级文字服务 彻底关闭高级文字服务 彻底关闭高级文字服务 彻底关闭高级文字服务 停止.Net2.0服务 启用DHCPClient服务 停止无线服务 停止无线服务 禁用计划任务服务 禁用...

    Win2003服务器系统文件权限设置小结

     “%SystemDrive%/boot.ini” Windows主要依赖Boot.ini文件来确定计算机在重启(引导)过程中显示的可供选取的操作系统类别 “%SystemDrive%/AUTOEXEC.BAT” 装有DOS或 Windows操作系统的计算机在启动的 时候,都要...

    网络安装微软原版系统 iso文件,http方式 支持uefi/传统bios

    sample目录里有默认配置文件,配置的路径是D:\netinstall-master,iso名称改成win.iso,解压出iso里的boot.wim,复制到boot目录下,就可以直接重命名.ini、.ipxe后面的字符并复制到D:\netinstall-master使用

    史上最全的IIS6.0完整安装包550个文件解决缺失文件问题

    ,BITSMGR.DL_,BITSSRV.DL_,BLANK.HT_,BLUEBARH.GI_,BLUEBARV.GI_,BLUE_SS.DL_,BOOT._,BRMFPORT.IN_,BROWSCAP.DL_,BROWSCAP.IN_,CACHE.DN_,CERTCARC.AS_,CERTCKPN.AS_,CERTDFLT.AS_,CERTFNSH.AS_,CERTLYNX.AS_,...

    用windbg调试uefi在hyper-v全套资源

    edksetup.bat Rebuild build 制作iso文件shell.efi放到这个位置 \EFI\BOOT\bootx64.efi fs0: load DebugAgentDxe.efi powershell Set-VMComPort -VMName dbguefiisov2 -Path \\.\pipe\windbg -Number 1 修改 C:\...

    Ntldr is Missing WinXPC盘系统文件

    压缩包里有AUTOEXEC.BAT、boot.ini、bootfont.bin、CONFIG.SYS、IO.SYS、MSDOS.SYS、NTDETECT.COM、ntldr文件,当系统出现Ntldr is missing时,就说明其中的ntdlr和Ntdetect.com两个文件有问题,只需要用启动盘进入...

    System Repair Engineer (调整和修复系统) 2.0.12.350 RC1 绿色

    BOOT.INI配置功能:设置BOOT.INI默认启动项、设置延时时间,设置启动开关等。 Win32服务配置功能:提供服务信息的枚举、禁用服务和删除服务功能。能够隐藏由 Microsoft Corp 发行的服务。 常见文件关联默认值自动...

    FCU1101嵌入式控制单元应用.rar

    │ 文件夹目录名批列出.bat │ ├─Linux │ ├─应用 │ │ │ 系统常用命令.pdf │ │ │ │ │ ├─485 │ │ │ 485-test │ │ │ 485-test.c │ │ │ │ │ ├─lora-EC32-TTL-100 │ │ │ │ E32_Demo....

    天汇标准汉字系统 V3.1 袖珍版 ( 包含五笔, 拼音输入法)

    也可直接修改Windows系统配置文件 System.ini (假设天汇的安装目录 为C:\TWAY): System.ini: [boot] ... ... [386Enh] device=c:\tway\tw.exe ... ... 这里需要说明的是, 由于Windows 95中文版中的驱动...

    Mcafee8.5i教程

    禁止对Boot.ini配置文件执行编辑操作 防止多用户同时登陆,禁用termsrv.dl 禁止使用NetMeeting功能访问远程桌面 禁止“私自指定某些程序在指定的时间运行” 禁止在C盘中新建任何PIF文件 禁止私自修改本地用户帐户...

    世界排名前6的杀软mcafee8.5i企业版

    禁止私自运行PING命令 禁止私自用源目录中的同名文件替换目标目录中的文件 禁止私自更改当前登录用户的权限 禁止私自调用文件属性修改工具 禁止对Boot.ini配置文件执行编辑操作 防止多用户同时...

    win8引导7、XP

    以下都要在管理员权限下的cmd运行,因为不知道你们win7在哪儿,recovery的目录名呀,看说明修改后把不需要执行的行前加rem ,最后一行加上pause,以便查看执行结果,另存为bat,运行即可,一键搞定的 首先要添加win7的...

    kkFileView是一款使用spring boot打造的文件文档在线预览项目解决方案,支持doc、docx、ppt、pptx、

    kkFileView是一款使用spring boot打造的文件文档在线预览项目解决方案,支持doc、docx、ppt、pptx、xls、xlsx、zip、rar、mp4、mp3以及众多类文本如txt、html、xml、java、properties、sql、js、md、json、conf、ini...

    linux全志R16的linux系统编译的资料_20170502_1655.7z

    全志R16平台编译linux系统V1.0.txt 2017/4/11 13:36 (编译请使用编译android的lichee的选项编译生成的.config文件,不然直接编译会报错!!...rootroot@cm-System-Product-Name:/home/wwt/linux_r16$ tar zxvf ...

    电脑系统优化大全

    在system.ini的[boot]和[386Enh]小节中加载了许多驱动程序和字体文件,是清除重点。尤其要注意的是,[boot]字段的shell=Explorer.exe是木马喜欢的隐蔽加载之所,木马们通常会将该句变为这样:shell=Explorer.exe ...

    DOS 软盘+光盘+U盘+硬盘+NTFS 想拥有更强大的DOS功能??

    ATTRIB.EXE DOS7.1的文件属性修改工具。 AUTOEXEC.BAT DOS的开机自动执行批处理文件。 CONFIG.SYS DOS的系统配置文件。 DELTREE.EXE DOS7.1自带的删除目录及内嵌文件工具。 D.COM DOS下的系统关机工具,适用于ATX...

    MS-DOS 5.0

    3.1 Installing MS-DOS 5.0 and OS/2 Dual-Boot Systems 3.2 Using the Uninstall Program on an OS/2 System 4. Solving Memory Problems 4.1 386MAX 4.2 All Computers Expanded-Memory Driver 4.3 Bus ...

    rtl8189es_r16m验证通过20170818_1659没有外层目录.7z

    # device/softwinner/astar-evb30/hawkview/sensor_list_cfg.ini:system/etc/hawkview/sensor_list_cfg.ini # Radio Packages and Configuration Flie $(call inherit-product, device/softwinner/common/rild/...

    !!!!rtl8189es_r16m验证通过20170818_1659没有外层目录.zip

    # device/softwinner/astar-evb30/hawkview/sensor_list_cfg.ini:system/etc/hawkview/sensor_list_cfg.ini # Radio Packages and Configuration Flie $(call inherit-product, device/softwinner/common/rild/...

Global site tag (gtag.js) - Google Analytics