Version x64
Código: Seleccionar todo
#cs -------------------------------------------------------
AutoIt Version: 3.3.8.1
Author..........: Pink
Codigo de Ejemplo...: Programas de Inicio
Gracias..........: Yashied "_RegJump"
Modo x64.........: requiere Compilar x64
#ce -------------------------------------------------------
;include Necesarias
#include <GuiMenu.au3>
#include <WindowsConstants.au3>
#include <GuiConstantsEx.au3>
#include <GuiListView.au3>
#include <GuiImageList.au3>
;>>>>>>>>>>>> Modo Eventos <<<<<<<<<<<<<<<<<<<<<
Opt("GUIOnEventMode", 1)
;>>>>>>>>>>>>>>>>>>>>>>>>>>>> Global variables <<<<<<<<<<<<<<<<<<<<<<<<<<<<
Global Enum $actualizar=1000,$openfolder, $openkey, $borrarfile, $borrarkey, $borrarkeyyfile,$carpetasinicio,$acercade
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Principal <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$hGUI = GUICreate('Programas de Inicio', 600, 300,-1,-1)
$hListView = _GUICtrlListView_Create($hGUI, "", 2, 2, 594, 250)
_GUICtrlListView_SetExtendedListViewStyle($hListView, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES))
GUICtrlCreateButton("Actualizar", 260, 265, 70,25)
GUICtrlSetOnEvent(-1, "Actualizar")
GUISetOnEvent($GUI_EVENT_CLOSE, "Cerrarme")
GUISetState()
;>>>>>>>>>>>>>> Registramos la función <<<<<<<<<<<<<<<<<<<<
GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")
; >>>>>>>>>>>>>>>>>>>>>>>>>> Columnas <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
_GUICtrlListView_InsertColumn($hListView, 0, "Clave", 50)
_GUICtrlListView_InsertColumn($hListView, 1, "Nombre", 150)
_GUICtrlListView_InsertColumn($hListView, 2, "Datos", 500)
_GUICtrlListView_InsertColumn($hListView, 3, "Estado", 60)
_GUICtrlListView_InsertColumn($hListView, 4, "clave", 0)
;>>>>>>>>>>>>>>>>>>>>>> Listamos <<<<<<<<<<<<<<<<<<<<<<
listar()
GUISetState()
; >>>>>>>>>>>>>>>>>>>>>>> bucle <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
While 1
Sleep(10)
WEnd
;>>>>>>>>>>>>>>>>>>>>>> Menu Contectual <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Func ListView_RClick()
Local $mipost,$rutaarchivo,$rutakey,$nombrekey,$estado
$mipost = _GUICtrlListView_SubItemHitTest($hListView)
If ($mipost[0] <> -1) Then
;>>>>>>>>>>>>>>>>>>>>>>>>>> Menu Contextual <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$hMenu = _GUICtrlMenu_CreatePopup()
_GUICtrlMenu_AddMenuItem($hMenu, "Actualizar", $actualizar)
_GUICtrlMenu_AddMenuItem($hMenu, "Abrir Carpeta", $openfolder)
_GUICtrlMenu_AddMenuItem($hMenu, "Abrir en Registro", $openkey)
_GUICtrlMenu_AddMenuItem($hMenu, "Borrar Archivo", $borrarfile)
_GUICtrlMenu_AddMenuItem($hMenu, "Borrar Clave", $borrarkey)
_GUICtrlMenu_AddMenuItem($hMenu, "Borrar Clave+Archivo",$borrarkeyyfile)
_GUICtrlMenu_AddMenuItem($hMenu, "Abrir Carpetas de Inicio",$carpetasinicio)
_GUICtrlMenu_AddMenuItem($hMenu, "Acerca de...", $acercade)
;>>>>>>>>>>>>>>>>>>> Seleccion Menu Contextual <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Switch _GUICtrlMenu_TrackPopupMenu($hMenu, $hListView, -1, -1, 1, 1, 2)
Case $actualizar
;Actualizamos la Lista
_GUICtrlListView_DeleteAllItems($hListView)
Listar()
Case $openfolder
;abrimos la Carpeta
$rutaarchivo=_GUICtrlListView_GetItemText($hListView, $mipost[0],2)
$rutaarchivo=StringRegExpReplace($rutaarchivo, '"?(.+\.\H*).*"?', '\1')
$rutaarchivo=Dir($rutaarchivo)
ShellExecute($rutaarchivo)
Case $openkey
;abrimos la clave en regedit
$rutakey=_GUICtrlListView_GetItemText($hListView, $mipost[0],4)
_RegJump($rutakey)
Case $borrarfile
;borramos Archivo
$estado=_GUICtrlListView_GetItemText($hListView, $mipost[0],3)
$rutaarchivo=_GUICtrlListView_GetItemText($hListView, $mipost[0],2)
$rutaarchivo=StringReplace($rutaarchivo,'"','')
$rutaarchivo=StringRegExpReplace($rutaarchivo, '"?(.+\.\H*).*"?', '\1')
If $estado="Existe" Then
if filedelete($rutaarchivo) Then
_GUICtrlListView_DeleteAllItems($hListView)
Listar()
Else
Msgbox(0,"Error","No se Pudo borrar " & $rutaarchivo)
EndIf
Else
msgbox(0,"","El Archivo no Existe")
EndIf
Case $borrarkey
;borramos clave de registro
$rutakey=_GUICtrlListView_GetItemText($hListView, $mipost[0],4)
$nombrekey=_GUICtrlListView_GetItemText($hListView, $mipost[0],1)
if RegDelete($rutakey,$nombrekey) Then
_GUICtrlListView_DeleteAllItems($hListView)
Listar()
Else
msgbox(0,"Error","No se Pudo Borrar")
EndIf
Case $borrarkeyyfile
;borramos archivo y clave de registro
$estado=_GUICtrlListView_GetItemText($hListView, $mipost[0],3)
$rutakey=_GUICtrlListView_GetItemText($hListView, $mipost[0],4)
$nombrekey=_GUICtrlListView_GetItemText($hListView, $mipost[0],1)
$rutaarchivo=_GUICtrlListView_GetItemText($hListView, $mipost[0],2)
$rutaarchivo=StringReplace($rutaarchivo,'"','')
$rutaarchivo=StringRegExpReplace($rutaarchivo, '"?(.+\.\H*).*"?', '\1')
Select
Case $estado = "Existe"
If regdelete($rutakey,$nombrekey) Then
if filedelete($rutaarchivo) Then
_GUICtrlListView_DeleteAllItems($hListView)
Listar()
Else
Msgbox(0,"Error","No se Pudo Borrar El Archivo")
_GUICtrlListView_DeleteAllItems($hListView)
Listar()
EndIf
Else
Msgbox(0,"Error","No se Pudo Borrar La Clave")
if FileDelete($rutaarchivo) Then
_GUICtrlListView_DeleteAllItems($hListView)
Listar()
Else
Msgbox(0,"Error","No se Pudo Borrar El Archivo")
EndIf
EndIf
Case $estado = "No Existe"
if RegDelete($rutakey,$nombrekey) Then
_GUICtrlListView_DeleteAllItems($hListView)
Listar()
Else
Msgbox(0,"Error","No se Pudo Borrar La Clave")
EndIf
EndSelect
Case $carpetasinicio
ShellExecute(@StartupDir)
ShellExecute(@StartupCommonDir)
Case $acercade
Msgbox(0,"Acerca de..","Programado por Pink")
EndSwitch
_GUICtrlMenu_DestroyMenu($hMenu)
EndIf
EndFunc
;>>>>>>>>>>>> Función WM_NOTIFY <<<<<<<<<<<<<<<<<<<<<
Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam)
Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView, $tInfo
$hWndListView = $hListView
If Not IsHWnd($hListView) Then $hWndListView = GUICtrlGetHandle($hListView)
$tNMHDR = DllStructCreate($tagNMHDR, $ilParam)
$hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom"))
$iIDFrom = DllStructGetData($tNMHDR, "IDFrom")
$iCode = DllStructGetData($tNMHDR, "Code")
Switch $hWndFrom
Case $hWndListView
Switch $iCode
Case $NM_RCLICK
ListView_RClick()
Return 0
EndSwitch
EndSwitch
Return $GUI_RUNDEFMSG
EndFunc
;>>>>>>>>>>>>>>>>>> Listar <<<<<<<<<<<<<<<<<<<<<
Func listar()
Local $clave[18]
local $filekey
for $a = 0 to 17
$clave[0]="HKLM\Software\Microsoft\Windows\CurrentVersion\Run"
$clave[1]="HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce"
$clave[2]="HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceEx"
$clave[3]="HKLM\Software\Microsoft\Windows\CurrentVersion\RunServices"
$clave[4]="HKLM\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce"
$clave[5]="HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run"
$clave[6]="HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Run"
$clave[7]="HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\RunOnce"
$clave[8]="HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\RunOnceEx"
$clave[9]="HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\RunServices"
$clave[10]="HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\RunServicesOnce"
$clave[11]="HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run"
$clave[12]="HKCU\Software\Microsoft\Windows\CurrentVersion\Run"
$clave[13]="HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce"
$clave[14]="HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnceEx"
$clave[15]="HKCU\Software\Microsoft\Windows\CurrentVersion\RunServices"
$clave[16]="HKCU\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce"
$clave[17]="HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run"
Local $valoritems
$instancia = 0
While 1
$instancia += 1
$valores = RegEnumVal($clave[$a], $instancia)
If @error <> 0 Then
ExitLoop
Else
$valor=RegRead($clave[$a],$valores)
$clavereg=StringSplit($clave[$a],"\")
$filekey=StringReplace($valor,'"','')
$filekey=StringRegExpReplace($filekey, '"?(.+\.\H*).*"?', '\1')
If FileExists($filekey) then
_GUICtrlListView_AddItem($hListView, $clavereg[1], $valoritems)
_GUICtrlListView_AddSubItem($hListView, $valoritems, $valores, 1)
_GUICtrlListView_AddSubItem($hListView, $valoritems, $valor, 2)
_GUICtrlListView_AddSubItem($hListView, $valoritems, "Existe", 3)
_GUICtrlListView_AddSubItem($hListView, $valoritems, $clave[$a], 4)
Else
_GUICtrlListView_AddItem($hListView, $clavereg[1], $valoritems)
_GUICtrlListView_AddSubItem($hListView, $valoritems, $valores, 1)
_GUICtrlListView_AddSubItem($hListView, $valoritems, $valor, 2)
_GUICtrlListView_AddSubItem($hListView, $valoritems, "No Existe", 3)
_GUICtrlListView_AddSubItem($hListView, $valoritems, $clave[$a], 4)
EndIf
EndIf
$valoritems+=1
WEnd
Next
EndFunc ;==>Listar
;>>>>>>>>>>>>>>>>>>>>>>> Directorio <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
func Dir($path)
local $delimiter="\"
$array =StringSplit($path,$delimiter)
$len=UBound($array)-1
$numero= $len-1
$num=StringInStr($path,$delimiter,0,$numero)
$dir=StringMid($path,1,$num)
return $dir
EndFunc ;==>Dir
;>>>>>>>>>>>>>>>> Salto clave de registro <<<<<<<<<<<<<<<<<<<<<<<<<<<< de Yashied
Func _RegJump($sKey)
Local $Root, $Text = StringSplit($sKey, '\', 2)
If IsArray($Text) Then
$Text = $Text[0]
Else
$Text = $sKey
EndIf
Switch $Text
Case 'HKEY_CLASSES_ROOT', 'HKEY_CURRENT_USER', 'HKEY_LOCAL_MACHINE', 'HKEY_USERS', 'HKEY_CURRENT_CONFIG'
$Root = $Text
Case 'HKCR'
$Root = 'HKEY_CLASSES_ROOT'
Case 'HKCU'
$Root = 'HKEY_CURRENT_USER'
Case 'HKLM'
$Root = 'HKEY_LOCAL_MACHINE'
Case 'HKU'
$Root = 'HKEY_USERS'
Case 'HKCC'
$Root = 'HKEY_CURRENT_CONFIG'
Case Else
Return 0
EndSwitch
Local $Class = '[CLASS:RegEdit_RegEdit]', $Delay = Opt('WinWaitDelay', 0)
Local $Prev, $Result = 1
If WinExists($Class) Then
WinClose($Class)
If Not WinWaitClose($Class, '', 5) Then
$Result = 0
EndIf
EndIf
If $Result Then
$Prev = RegRead('HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit', 'Lastkey')
If @error Then
$Prev = 0
EndIf
If Not RegWrite('HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit', 'Lastkey', 'REG_SZ', StringReplace($sKey, $Text, $Root, 1)) Then
$Result = 0
Else
If Not Run('regedit.exe') Then
$Result = 0
If IsString($Prev) Then
RegWrite('HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit', 'Lastkey', 'REG_SZ', $Prev)
EndIf
EndIf
EndIf
EndIf
Opt('WinWaitDelay', $Delay)
Return $Result
EndFunc ;==>_RegJump
;>>>>>>>>>>> >>>>>>>Cerrar <<<<<<<<<<<<<<<<<<<<<<<<<<<
Func Cerrarme()
Exit
EndFunc;Cerrarme
;>>>>>>>>>>>>> Actualizar lista boton <<<<<<<<<<<<<<<<<
Func Actualizar()
_GUICtrlListView_DeleteAllItems($hListView)
Listar()
EndFunc ;==>Actualizar
Código: Seleccionar todo
#cs -------------------------------------------------------
AutoIt Version: 3.3.8.1
Author..........: Pink
Codigo de Ejemplo...: Programas de Inicio
Gracias..........: Yashied "_RegJump"
Modo x86.........: requiere Compilar x86
#ce -------------------------------------------------------
;include Necesarias
#include <GuiMenu.au3>
#include <WindowsConstants.au3>
#include <GuiConstantsEx.au3>
#include <GuiListView.au3>
#include <GuiImageList.au3>
;>>>>>>>>>>>> Modo Eventos <<<<<<<<<<<<<<<<<<<<<
Opt("GUIOnEventMode", 1)
;>>>>>>>>>>>>>>>>>>>>>>>>>>>> Global variables <<<<<<<<<<<<<<<<<<<<<<<<<<<<
Global Enum $actualizar=1000,$openfolder, $openkey, $borrarfile, $borrarkey, $borrarkeyyfile,$carpetasinicio,$acercade
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Principal <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$hGUI = GUICreate('Programas de Inicio', 600, 300,-1,-1)
$hListView = _GUICtrlListView_Create($hGUI, "", 2, 2, 594, 250)
_GUICtrlListView_SetExtendedListViewStyle($hListView, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES))
GUICtrlCreateButton("Actualizar", 260, 265, 70,25)
GUICtrlSetOnEvent(-1, "Actualizar")
GUISetOnEvent($GUI_EVENT_CLOSE, "Cerrarme")
;>>>>>>>>>>>>>> Registramos la función <<<<<<<<<<<<<<<<<<<<
GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")
; >>>>>>>>>>>>>>>>>>>>>>>>>> Columnas <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
_GUICtrlListView_InsertColumn($hListView, 0, "Clave", 50)
_GUICtrlListView_InsertColumn($hListView, 1, "Nombre", 150)
_GUICtrlListView_InsertColumn($hListView, 2, "Datos", 500)
_GUICtrlListView_InsertColumn($hListView, 3, "Estado", 60)
_GUICtrlListView_InsertColumn($hListView, 4, "clave", 0)
;>>>>>>>>>>>>>>>>>>>>>> Listamos <<<<<<<<<<<<<<<<<<<<<<
listar()
GUISetState()
; >>>>>>>>>>>>>>>>>>>>>>> bucle <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
While 1
Sleep(10)
WEnd
;>>>>>>>>>>>>>>>>>>>>>> Menu Contectual <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Func ListView_RClick()
Local $mipost,$rutaarchivo,$rutakey,$nombrekey,$estado
$mipost = _GUICtrlListView_SubItemHitTest($hListView)
If ($mipost[0] <> -1) Then
;>>>>>>>>>>>>>>>>>>>>>>>>>> Menu Contextual <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$hMenu = _GUICtrlMenu_CreatePopup()
_GUICtrlMenu_AddMenuItem($hMenu, "Actualizar", $actualizar)
_GUICtrlMenu_AddMenuItem($hMenu, "Abrir Carpeta", $openfolder)
_GUICtrlMenu_AddMenuItem($hMenu, "Abrir en Registro", $openkey)
_GUICtrlMenu_AddMenuItem($hMenu, "Borrar Archivo", $borrarfile)
_GUICtrlMenu_AddMenuItem($hMenu, "Borrar Clave", $borrarkey)
_GUICtrlMenu_AddMenuItem($hMenu, "Borrar Clave+Archivo",$borrarkeyyfile)
_GUICtrlMenu_AddMenuItem($hMenu, "Abrir Carpetas de Inicio",$carpetasinicio)
_GUICtrlMenu_AddMenuItem($hMenu, "Acerca de...", $acercade)
;>>>>>>>>>>>>>>>>>>> Seleccion Menu Contextual <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Switch _GUICtrlMenu_TrackPopupMenu($hMenu, $hListView, -1, -1, 1, 1, 2)
Case $actualizar
;Actualizamos la Lista
_GUICtrlListView_DeleteAllItems($hListView)
Listar()
Case $openfolder
;abrimos la Carpeta
$rutaarchivo=_GUICtrlListView_GetItemText($hListView, $mipost[0],2)
$rutaarchivo=StringRegExpReplace($rutaarchivo, '"?(.+\.\H*).*"?', '\1')
$rutaarchivo=Dir($rutaarchivo)
ShellExecute($rutaarchivo)
Case $openkey
;abrimos la clave en regedit
$rutakey=_GUICtrlListView_GetItemText($hListView, $mipost[0],4)
_RegJump($rutakey)
Case $borrarfile
;borramos Archivo
$estado=_GUICtrlListView_GetItemText($hListView, $mipost[0],3)
$rutaarchivo=_GUICtrlListView_GetItemText($hListView, $mipost[0],2)
$rutaarchivo=StringReplace($rutaarchivo,'"','')
$rutaarchivo=StringRegExpReplace($rutaarchivo, '"?(.+\.\H*).*"?', '\1')
If $estado="Existe" Then
if filedelete($rutaarchivo) Then
_GUICtrlListView_DeleteAllItems($hListView)
Listar()
Else
Msgbox(0,"Error","No se Pudo borrar " & $rutaarchivo)
EndIf
Else
msgbox(0,"","El Archivo no Existe")
EndIf
Case $borrarkey
;borramos clave de registro
$rutakey=_GUICtrlListView_GetItemText($hListView, $mipost[0],4)
$nombrekey=_GUICtrlListView_GetItemText($hListView, $mipost[0],1)
if RegDelete($rutakey,$nombrekey) Then
_GUICtrlListView_DeleteAllItems($hListView)
Listar()
Else
msgbox(0,"Error","No se Pudo Borrar")
EndIf
Case $borrarkeyyfile
;borramos archivo y clave de registro
$estado=_GUICtrlListView_GetItemText($hListView, $mipost[0],3)
$rutakey=_GUICtrlListView_GetItemText($hListView, $mipost[0],4)
$nombrekey=_GUICtrlListView_GetItemText($hListView, $mipost[0],1)
$rutaarchivo=_GUICtrlListView_GetItemText($hListView, $mipost[0],2)
$rutaarchivo=StringReplace($rutaarchivo,'"','')
$rutaarchivo=StringRegExpReplace($rutaarchivo, '"?(.+\.\H*).*"?', '\1')
Select
Case $estado = "Existe"
If regdelete($rutakey,$nombrekey) Then
if filedelete($rutaarchivo) Then
_GUICtrlListView_DeleteAllItems($hListView)
Listar()
Else
Msgbox(0,"Error","No se Pudo Borrar El Archivo")
_GUICtrlListView_DeleteAllItems($hListView)
Listar()
EndIf
Else
Msgbox(0,"Error","No se Pudo Borrar La Clave")
if FileDelete($rutaarchivo) Then
_GUICtrlListView_DeleteAllItems($hListView)
Listar()
Else
Msgbox(0,"Error","No se Pudo Borrar El Archivo")
EndIf
EndIf
Case $estado = "No Existe"
if RegDelete($rutakey,$nombrekey) Then
_GUICtrlListView_DeleteAllItems($hListView)
Listar()
Else
Msgbox(0,"Error","No se Pudo Borrar La Clave")
EndIf
EndSelect
Case $carpetasinicio
ShellExecute(@StartupDir)
ShellExecute(@StartupCommonDir)
Case $acercade
Msgbox(0,"Acerca de..","Programado por Pink")
EndSwitch
_GUICtrlMenu_DestroyMenu($hMenu)
EndIf
EndFunc
;>>>>>>>>>>>> Función WM_NOTIFY <<<<<<<<<<<<<<<<<<<<<
Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam)
Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView, $tInfo
$hWndListView = $hListView
If Not IsHWnd($hListView) Then $hWndListView = GUICtrlGetHandle($hListView)
$tNMHDR = DllStructCreate($tagNMHDR, $ilParam)
$hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom"))
$iIDFrom = DllStructGetData($tNMHDR, "IDFrom")
$iCode = DllStructGetData($tNMHDR, "Code")
Switch $hWndFrom
Case $hWndListView
Switch $iCode
Case $NM_RCLICK
ListView_RClick()
Return 0
EndSwitch
EndSwitch
Return $GUI_RUNDEFMSG
EndFunc
;>>>>>>>>>>>>>>>>>> Listar <<<<<<<<<<<<<<<<<<<<<
Func listar()
Local $clave[12]
local $filekey
for $a = 0 to 11
$clave[0]="HKLM\Software\Microsoft\Windows\CurrentVersion\Run"
$clave[1]="HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce"
$clave[2]="HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceEx"
$clave[3]="HKLM\Software\Microsoft\Windows\CurrentVersion\RunServices"
$clave[4]="HKLM\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce"
$clave[5]="HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run"
$clave[6]="HKCU\Software\Microsoft\Windows\CurrentVersion\Run"
$clave[7]="HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce"
$clave[8]="HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnceEx"
$clave[9]="HKCU\Software\Microsoft\Windows\CurrentVersion\RunServices"
$clave[10]="HKCU\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce"
$clave[11]="HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run"
Local $valoritems
$instancia = 0
While 1
$instancia += 1
$valores = RegEnumVal($clave[$a], $instancia)
If @error <> 0 Then
ExitLoop
Else
$valor=RegRead($clave[$a],$valores)
$clavereg=StringSplit($clave[$a],"\")
$filekey=StringReplace($valor,'"','')
$filekey=StringRegExpReplace($filekey, '"?(.+\.\H*).*"?', '\1')
If FileExists($filekey) then
_GUICtrlListView_AddItem($hListView, $clavereg[1], $valoritems)
_GUICtrlListView_AddSubItem($hListView, $valoritems, $valores, 1)
_GUICtrlListView_AddSubItem($hListView, $valoritems, $valor, 2)
_GUICtrlListView_AddSubItem($hListView, $valoritems, "Existe", 3)
_GUICtrlListView_AddSubItem($hListView, $valoritems, $clave[$a], 4)
Else
_GUICtrlListView_AddItem($hListView, $clavereg[1], $valoritems)
_GUICtrlListView_AddSubItem($hListView, $valoritems, $valores, 1)
_GUICtrlListView_AddSubItem($hListView, $valoritems, $valor, 2)
_GUICtrlListView_AddSubItem($hListView, $valoritems, "No Existe", 3)
_GUICtrlListView_AddSubItem($hListView, $valoritems, $clave[$a], 4)
EndIf
EndIf
$valoritems+=1
WEnd
Next
EndFunc
;>>>>>>>>>>>>>>>>>>>>>>> Directorio <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
func Dir($path)
local $delimiter="\"
$array =StringSplit($path,$delimiter)
$len=UBound($array)-1
$numero= $len-1
$num=StringInStr($path,$delimiter,0,$numero)
$dir=StringMid($path,1,$num)
return $dir
EndFunc
;>>>>>>>>>>>>>>>> Salto clave de registro <<<<<<<<<<<<<<<<<<<<<<<<<<<< de Yashied
Func _RegJump($sKey)
Local $Root, $Text = StringSplit($sKey, '\', 2)
If IsArray($Text) Then
$Text = $Text[0]
Else
$Text = $sKey
EndIf
Switch $Text
Case 'HKEY_CLASSES_ROOT', 'HKEY_CURRENT_USER', 'HKEY_LOCAL_MACHINE', 'HKEY_USERS', 'HKEY_CURRENT_CONFIG'
$Root = $Text
Case 'HKCR'
$Root = 'HKEY_CLASSES_ROOT'
Case 'HKCU'
$Root = 'HKEY_CURRENT_USER'
Case 'HKLM'
$Root = 'HKEY_LOCAL_MACHINE'
Case 'HKU'
$Root = 'HKEY_USERS'
Case 'HKCC'
$Root = 'HKEY_CURRENT_CONFIG'
Case Else
Return 0
EndSwitch
Local $Class = '[CLASS:RegEdit_RegEdit]', $Delay = Opt('WinWaitDelay', 0)
Local $Prev, $Result = 1
If WinExists($Class) Then
WinClose($Class)
If Not WinWaitClose($Class, '', 5) Then
$Result = 0
EndIf
EndIf
If $Result Then
$Prev = RegRead('HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit', 'Lastkey')
If @error Then
$Prev = 0
EndIf
If Not RegWrite('HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit', 'Lastkey', 'REG_SZ', StringReplace($sKey, $Text, $Root, 1)) Then
$Result = 0
Else
If Not Run('regedit.exe') Then
$Result = 0
If IsString($Prev) Then
RegWrite('HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit', 'Lastkey', 'REG_SZ', $Prev)
EndIf
EndIf
EndIf
EndIf
Opt('WinWaitDelay', $Delay)
Return $Result
EndFunc ;==>_RegJump
;>>>>>>>>>>> >>>>>>>Cerrar <<<<<<<<<<<<<<<<<<<<<<<<<<<
Func Cerrarme()
Exit
EndFunc;Cerrarme
;>>>>>>>>>>>>> Actualizar lista boton <<<<<<<<<<<<<<<<<
Func Actualizar()
_GUICtrlListView_DeleteAllItems($hListView)
Listar()
EndFunc ;==>Actualizar