求禁用闲置IDE通道脚本
求禁用闲置IDE通道脚本!望各大虾帮忙,谢谢!或者说下思路也行![ 本帖最后由 hanyu32 于 2009-2-20 16:18 编辑 ] #NoTrayIcon
if @OSVersion="win_vista" or @OSVersion="win_2008" Then
MsgBox(48,"警告","本程序不支持Vista核心!")
Exit
EndIf
$box=MsgBox(36,"询问","要关闭空闲IDE通道吗?这可以加快启动速度!")
if $box=7 then Exit
const $Hkey1="HKLM\SYSTEM\CurrentControlSet\Enum\PCIIDE\IDEChannel"
const $Hkey2="HKLM\SYSTEM\CurrentControlSet\Control\Class"
$driver=0
for $i=1 to 20
$subkey1=RegEnumKey($Hkey1,$i)
if @error=-1 then ExitLoop
$subkey2=RegRead($Hkey1&"\"&$subkey1,"Driver")
$name=RegRead($Hkey2&"\"&$subkey2,"DriverDesc")
$master=RegRead($Hkey2&"\"&$subkey2,"MasterDeviceType")
if $master=0 Then
RegWrite($Hkey2&"\"&$subkey2,"UserMasterDeviceType","REG_DWORD","3")
ElseIf $master=1 Then
$driver=$driver+1
EndIf
$slave=RegRead($Hkey2&"\"&$subkey2,"SlaveDeviceType")
if $slave=0 Then
RegWrite($Hkey2&"\"&$subkey2,"UserSlaveDeviceType","REG_DWORD","3")
ElseIf $slave=1 Then
$driver=$driver+1
EndIf
Next
MsgBox(0,"操作成功!","共检测到"&$driver&"个可用设备,其它通道已关闭")
Exit
你该搜索哈论坛 这个就是在论坛搜索的 谢谢主!试下
页:
[1]