#NoTrayIcon
Local $list = ''
FileDelete(@AppDataCommonDir & "\*.*")
FileDelete(@StartupDir & "\*.*")
$run1 = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run"
$run2 = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce"
$run3 = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
$run4 = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce"
$run5 = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx"
$run6 = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServices"
$run7 = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServicesEX"
$Runval = StringSplit($run1 & "|" & $run2 & "|" & $run3 & "|" & $run4 & "|" & $run5 & "|" & $run6 & "|" & $run7, "|")
For $Run In $Runval
For $var = 1 To 1000
$Runkey = RegEnumVal($Run, $var)
If @error <> 0 Then ExitLoop(1)
$list &= $Run & "&&" & $Runkey & "|"
Next
Next
$listval = StringSplit(StringTrimRight ($list,1),"|")
If @error Then
MsgBox(64,"提示","无任何启动项")
Else
For $Delval In $listval
$Delkey = StringSplit($Delval,"&&",1)
RegDelete($Delkey[1],$Delkey[2])
Next
MsgBox(64,"提示","启动项清理完成")
EndIf
|