Func makeitem($num)
If $num = 2 Then
_read("HKCU\SOFTWARE\Policies\Microsoft\Windows\SYSTEM\Scripts")
_read("HKCU\SOFTWARE\Policies\Microsoft\Windows\SYSTEM\Scripts\Logon")
_read("HKCU\SOFTWARE\Microsoft\Windows\SYSTEM\Scripts")
_read("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServices")
_read("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\SYSTEM\Shell")
_read("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServicesOnce")
_read("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\SYSTEM\Shell")
_read("HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell")
_read("HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\Load")
_read("HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\Run")
_read("HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\TerminalServer\Install\SOFTWARE\Microsoft\Windows\CurrentVersion\Runonce")
_read("HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\TerminalServer\Install\SOFTWARE\Microsoft\Windows\CurrentVersion\RunonceEx")
_read("HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\TerminalServer\Install\SOFTWARE\Microsoft\Windows\CurrentVersion\Run")
_read("HKCU\SOFTWARE\Microsoft\Active Setup\Installed Components")
_read("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ShellServiceObjectDelayLoad")
_read("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved")
_read("HKCU\SOFTWARE\Microsoft\Internet Explorer\Desktop\Components")
_read("HKCU\SOFTWARE\Microsoft\Internet Explorer\UrlSearchHooks")
_read("HKCU\SOFTWARE\Microsoft\Internet Explorer\Explorer Bars")
_read("HKCU\SOFTWARE\Microsoft\Internet Explorer\Extensions")
_read("HKCU\SOFTWARE\Microsoft\Command Processor\Autorun")
_read("HKCU\Control Panel\Desktop\Scrnsave.exe")
_read($CCS & "Control\Terminal Server\Wds\rdpwd\StartupPrograms")
_read($CCS & "Services")
_read($CCS & "Control\Session Manager\BootExecute")
_read($CCS & "Control\Session Manager\KnownDlls")
_read($CCS & "Control\BootVerificationProgram\ImageName")
_read($CCS & "Control\Print\Monitors")
_read($CCS & "Control\Lsa\Authentication Packages")
_read($CCS & "Control\Lsa\Notification Packages")
_read($CCS & "Control\Lsa\Security Packages")
_read($CCS & "Services\WinSock2\Parameters\Protocol_Catalog9")
_read($CV & "RunServices")
_read($CV & "RunServicesOnce")
_read($CV & "ShellServiceObjectDelayLoad")
_read($CV & "Policies\SYSTEM\Shell")
_read($CV & "Policies\Explorer\Run")
_read($CV & "Explorer\ShellExecuteHooks")
_read($CV & "Shell Extensions\Approved")
_read($CV & "Explorer\SharedTaskScheduler")
_read($CV & "ShellServiceObjectDelayLoad")
_read($CV & "Explorer\Browser Helper Objects")
_read("HKLM\SOFTWARE\Classes\Protocols\Filter")
_read("HKLM\SOFTWARE\Classes\Protocols\Handler")
_read("HKLM\SOFTWARE\Classes\Folder\Shellex\ColumnHandlers")
_read("HKLM\SOFTWARE\Classes\Exefile\Shell\Open\Command\(Default)")
_read("HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components")
_read("HKLM\SOFTWARE\Microsoft\Command Processor\Autorun")
_read("HKLM\SOFTWARE\Microsoft\Internet Explorer\Toolbar")
_read("HKLM\SOFTWARE\Microsoft\Internet Explorer\Explorer Bars")
_read("HKLM\SOFTWARE\Microsoft\Internet Explorer\Extensions")
_read("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AppSetup")
_read("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Userinit")
_read("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell")
_read("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Taskman")
_read("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\TerminalServer\Install\SOFTWARE\Microsoft\Windows\CurrentVersion\Runonce")
_read("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\TerminalServer\Install\SOFTWARE\Microsoft\Windows\CurrentVersion\RunonceEx")
_read("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\TerminalServer\Install\SOFTWARE\Microsoft\Windows\CurrentVersion\Run")
_read("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options")
_read("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\Appinit_Dlls")
_read("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SYSTEM")
_read("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\UIHost")
_read("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify")
_read("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\GinaDLL")
_read("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Taskman")
_read("HKLM\SOFTWARE\Policies\Microsoft\Windows\SYSTEM\Scripts")
_read("HKLM\SOFTWARE\Policies\Microsoft\Windows\SYSTEM\Scripts\Logon")
EndIf
_read("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx")
_read("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce")
_read("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run")
_read("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run")
_read($CV & "RunOnceEx")
_read($CV & "RunOnce")
_read($CV & "Policies\Explorer\Run")
_read($CV & "Run")
addlnk(@StartupCommonDir)
addlnk(@StartupDir)
EndFunc ;==>makeitem
Func addlnk($j)
Select
Case FileExists($j) = 1
$filelist = _FileListToArray($j)
If @error = 0 Then
$w = _GUICtrlListView_GetItemCount($hTree6)
For $i = 1 To $filelist[0]
_GUICtrlListView_AddItem($hTree6, $filelist[$i], $w + $i)
_GUICtrlListView_AddItem($hTree6, $w + $i, $j, 2)
Next
EndIf
EndSelect
EndFunc ;==>addlnk
Func delstart()
$Count = _GUICtrlListView_GetItemCount($hTree6)
For $i = 0 To $Count
If _GUICtrlListView_GetItemChecked($hTree6, $i) Then
RegDelete(_GUICtrlListView_GetItemText($hTree6, $i, 2), _GUICtrlListView_GetItemText($hTree6, $i, 0))
_GUICtrlListView_SetItemSelected($hTree6, $i)
_GUICtrlListView_DeleteItemsSelected($hTree6)
EndIf
Next
EndFunc ;==>delstart
Func _read($k)
$j = 1
While 1
$key = RegEnumVal($k, $j)
$var = RegRead($k, $key)
If @error <> 0 Then ExitLoop
_GUICtrlListView_AddItem($hTree6, $key, $u)
_GUICtrlListView_AddSubItem($hTree6, $u, $var, 1)
_GUICtrlListView_AddSubItem($hTree6, $u, $k, 2)
$u += 1
$j += 1
WEnd
EndFunc ;==>_read
Func backup()
Local $regfile = @MyDocumentsDir & "\startup.reg"
If FileExists($regfile) = 0 Then
FileWrite($regfile, "Windows Registry Editor Version 5.00" & @CRLF)
EndIf
For $i = 0 To _GUICtrlListView_GetItemCount($hTree6)
Select
Case StringInStr(_GUICtrlListView_GetItemText($hTree6, $i, 2), "HKLM") <> 0
FileWrite($regfile, "[HKEY_LOCAL_MACHINE" & StringTrimLeft(_GUICtrlListView_GetItemText($hTree6, $i, 2), 4) & "]" & @CRLF)
Case StringInStr(_GUICtrlListView_GetItemText($hTree6, $i, 2), "HKCU") <> 0
FileWrite($regfile, "[HKEY_CURRENT_USER" & StringTrimLeft(_GUICtrlListView_GetItemText($hTree6, $i, 2), 4) & "]" & @CRLF)
EndSelect
FileWrite($regfile, '"' & _GUICtrlListView_GetItemText($hTree6, $i, 0) & '"="' & _GUICtrlListView_GetItemText($hTree6, $i, 1) & '"' & @CRLF)
Next
MsgBox('', 'OK', "备份完成!")
EndFunc ;==>backup