找回密码
 加入
搜索
查看: 1149|回复: 0

这个AU3源码不能运行

[复制链接]
发表于 2009-8-1 21:34:49 | 显示全部楼层 |阅读模式
这是《攻略》中删除驱动的源码,可是不能完整运行,错误在哪啊,哪位大虾指点一下
#NoTrayIcon
Dim $Class,$Cls,$Device,$DeviceID,$DeviceName,$FileHandle,$i,$j,$k,$NoUnloadClass[5],$Flag,$LastDeviceID
$Class="HKLM\SYSTEM\CurrentControlSet\Control\Class\"
$FileHandle=FileOpen(@ScriptDir&"Device.esp",2)
$i=1
$NoUnloadClass[0]="{4D36E966-E325-11CE-BFC1-08002BE10318}"
$NoUnloadClass[1]="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
$NoUnloadClass[2]="{4D36E96B-E325-11CE-BFC1-08002BE10318}"
$NoUnloadClass[3]="{4D36E96F-E325-11CE-BFC1-08002BE10318}"
$NoUnloadClass[4]="{4D36E97D-E325-11CE-BFC1-08002BE10318}"
$LastDeviceID="Skyfree"
While(1)
$Cls=RegEnumKey($Class,$i)
If @error=-1 Then ExitLoop
$k=0
$Flag=0
While($k<5)
If $Cls=$NoUnloadClass[$k] Then
$Flag=1
ExitLoop
EndIf
$k=$k+1
WEnd
If $Flag=0 Then
$Cls=$Class&$Cls
$j=1
While(1)
$Device=RegEnumKey($Cls,$j)
If @error=-1 Then ExitLoop
$Device=$Cls&"\"&$Device
$DeviceID=RegRead($Device,"MatchingDeviceId")
If $DeviceID<>$LastDeviceID And $DeviceID<>"" Then
FileWriteLine(@ScriptDir&"Device.esp",$DeviceID)
$LastDeviceID=$DeviceID
EndIf
$j=$j+1
WEnd
EndIf
$i=$i+1
WEnd
FileClose($FileHandle)
$FileHandle=FileOpen(@ScriptDir&"Device.esp",0)
$i=1
While(1)
$DeviceID=FileReadLine(@ScriptDir&"Device.esp",$i)
If @error=-1 Then ExitLoop
RunWait("cmd /c devcon remove"&$DeviceID,"",@SW_HIDE)
$i=$i+1
WEnd
FileClose($FileHandle)
FileDelete(@ScriptDir&"Device.esp")
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-22 23:21 , Processed in 0.104378 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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