关闭IDE通道检测的批处理

所属分类: 脚本专栏 / DOS/BAT 阅读数: 1062
收藏 0 赞 0 分享
:: 修改IDE通道检测设备模式,不接设备的设置为无,提高XP启动速度
:: 建议在系统第二次重新启动检测到所有已经安装的IDE设备后运行
:: Author: Climbing(xclimbing@msn.com)
:: Date: 2006.10.28
@set _debug=
@echo %_debug% off & setlocal ENABLEDELAYEDEXPANSION
set hkey1=HKLM\SYSTEM\CurrentControlSet\Enum\PCIIDE\IDEChannel
set hkey2=HKLM\SYSTEM\CurrentControlSet\Control\Class
for /f "usebackq tokens=*" %%I in (`reg query %hkey1% ^| find /i "IDEChannel\"`) do call :_check "%%I"
goto :eof

:_check
::echo %1
set subkey=
for /f "usebackq tokens=3*" %%J in (`reg query %1 ^| find /i "driver"`) do set subkey=%%J
set DriverDesc=
for /f "usebackq tokens=3,4*" %%K in (`reg query "%hkey2%\%subkey%" /v DriverDesc ^| find /i "driverdesc"`) do set DriverDesc=%%K %%L 通道
reg query "%hkey2%\%subkey%" /v MasterDeviceType | find /i "0x1" > nul
if %errorlevel%==1 goto _ChgMaster
goto _CheckSlave

:_ChgMaster
reg add "%hkey2%\%subkey%" /v UserMasterDeviceType /t REG_DWORD /d 3 /f
echo “%DriverDesc%”的设备0检测方式设置为无。

:_CheckSlave
reg query "%hkey2%\%subkey%" /v SlaveDeviceType | find /i "0x1" > nul
if %errorlevel%==1 goto _ChgSlave
goto :eof

:_ChgSlave
reg add "%hkey2%\%subkey%" /v UserSlaveDeviceType /t REG_DWORD /d 3 /f
echo “%DriverDesc%”的设备1检测方式设置为无。
goto :eof
更多精彩内容其他人还在看

Cls 清除命令提示符窗口

Cls 清除命令提示符窗口
收藏 0 赞 0 分享

Cmd 启动命令解释器 Cmd.exe 的新实例

Cmd 启动命令解释器 Cmd.exe 的新实例
收藏 0 赞 0 分享

Cmstp 安装或删除“连接管理器”服务配置文件

Cmstp 安装或删除“连接管理器”服务配置文件
收藏 0 赞 0 分享

color 对于当前会话,更改命令提示窗口的前景和背景色

color 对于当前会话,更改命令提示窗口的前景和背景色
收藏 0 赞 0 分享

配置命令提示符的方法

配置命令提示符的方法
收藏 0 赞 0 分享

Comp 逐字节地比较两个文件或几组文件的内容

Comp 逐字节地比较两个文件或几组文件的内容
收藏 0 赞 0 分享

Compact 显示和更改 NTFS 分区上的文件或目录压缩

Compact 显示和更改 NTFS 分区上的文件或目录压缩
收藏 0 赞 0 分享

Del (erase) 删除指定文件

Del (erase) 删除指定文件
收藏 0 赞 0 分享

Convert  将 FAT 和 FAT32 卷转换为 NTFS

Convert  将 FAT 和 FAT32 卷转换为 NTFS
收藏 0 赞 0 分享

copy 将一个或多个文件从一个位置复制到其他位置

copy 将一个或多个文件从一个位置复制到其他位置
收藏 0 赞 0 分享
查看更多