wlss 发表于 2009-8-1 21:34:49

这个AU3源码不能运行

这是《攻略》中删除驱动的源码,可是不能完整运行,错误在哪啊,哪位大虾指点一下
#NoTrayIcon
Dim $Class,$Cls,$Device,$DeviceID,$DeviceName,$FileHandle,$i,$j,$k,$NoUnloadClass,$Flag,$LastDeviceID
$Class="HKLM\SYSTEM\CurrentControlSet\Control\Class\"
$FileHandle=FileOpen(@ScriptDir&"Device.esp",2)
$i=1
$NoUnloadClass="{4D36E966-E325-11CE-BFC1-08002BE10318}"
$NoUnloadClass="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
$NoUnloadClass="{4D36E96B-E325-11CE-BFC1-08002BE10318}"
$NoUnloadClass="{4D36E96F-E325-11CE-BFC1-08002BE10318}"
$NoUnloadClass="{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")
页: [1]
查看完整版本: 这个AU3源码不能运行