还是前辈厉害,我写的是这样的。
郁闷的是不能获取到360安全卫士和其他一些驱动程序的相关启动。#include <GuiListView.au3>
#include <GuiImageList.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ListViewConstants.au3>
$Form1 = GUICreate("启动项管理", 320, 350)
$ListView1 = GUICtrlCreateListView("名称 |位置 ", 10, 10, 300, 320,-1, BitOR($WS_EX_CLIENTEDGE,$LVS_EX_FULLROWSELECT,$LVS_REPORT))
$hImage = _GUIImageList_Create(1, 20)
_GUICtrlListView_SetImageList($ListView1, $hImage, 1)
_GUICtrlListView_SetColumnWidth($ListView1, 0, 80)
_GUICtrlListView_SetColumnWidth($ListView1, 1, 200)
GUISetState(@SW_SHOW)
Read()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func Read()
$z = 0
_GUICtrlListView_DeleteAllItems($ListView1)
For $i = 1 To 10
$var = RegEnumVal('HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run',$i)
If Not @error Then
GUICtrlCreateListViewItem($var,$ListView1)
$a = RegRead('HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run',$var)
_GUICtrlListView_AddSubItem($ListView1, $z, $a, 1, $z+1)
EndIf
$z += 1
Next
EndFunc
|