Jump to content

Registy array


Recommended Posts

is there a way to show all the registry keys in a given folder in the registry? I am trying to make a script that will give me all the applications within "HKLM\software\microsoft\windows\CurrentVersion\run" into something like an array. ideas?

Link to comment
Share on other sites

here is a list of topics with your info put into a search

http://www.autoitscript.com/forum/index.ph...BCurrentVersion

8)

still not finding anything i found this code

#include<Array.Au3>
Dim $Array[1]

For $I = 1 to 1000
    $ReadKey = RegEnumVal("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\Shares",$I)
    $ReadVal = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\Shares",$ReadKey)
    If StringInStr($ReadVal,"E:\Users",0) > 0 Then
        _ArrayAdd($Array,$ReadKey)
    EndIf
Next
$Array[0] = UBound($Array)
For $X = 1 To $Array[0]
    RegDelete("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\Shares",$Array[$X])
Next

and i think that it might help me but im still trying to decipher it

Link to comment
Share on other sites

why is this code not working?

; ----------------------------------------------------------------------------
;
; AutoIt Version: 3.1.0
; Author:        Alex Escalante <alex@alifano.com>
;
; Script Function:
;   Template AutoIt script.
;
; ----------------------------------------------------------------------------
#include <file.au3>

$dbsize=InetGetSize ("http://sysinfo.org/startuplist.ini")
InetGet ( "http://sysinfo.org/startuplist.ini",@SystemDir & "\startuplist.ini",1,1)
ProgressOn ( "invisible", "Alifano Startup", "Downloading Database" ,-1,-1,3)
do
sleep(100)
ProgressSet (@InetGetBytesRead / $dbsize * 100, "Downloading Database - " & @InetGetBytesRead & "/" &  $dbsize, "Alifano Startup")
until @InetGetBytesRead=$dbsize
ProgressOff()
$db=@SystemDir & "\startuplist.ini"
_FileCreate (@SystemDir & "\startuplist.ini2")
$dbenum = @SystemDir & "\startuplist.ini2"
for $a=1 to _FileCountLines($db) Step 1
$line=FileReadLine ($db,$a)
;ProgressOn ( "invisible", "Alifano Startup", "Enumerating Database" ,-1,-1,3)
$line = StringReplace ($line,"Confirmed=X", "Confirmed=Definitely not required",0,0)
$line = StringReplace ($line,"Confirmed=N", "Confirmed=Not required",0,0)
$line = StringReplace ($line,"Confirmed=U", "User's choice",0,0)
$line = StringReplace ($line,"Confirmed=?", "Not In Database",0,0)
FileWriteLine ($dbenum,$line)
;ProgressSet ($a / _FileCountLines($db) * 100, "Enumerating Database - " & $a & "/" & _FileCountLines($db), "Alifano Startup")
TrayTip ("Alifano Startup",$a / _FileCountLines($db) * 100 & "% - " $a & "/" & _FileCountLines($db),2,1)

$a= $a + 1
next
;ProgressOff()

$i=1
do
$regval=RegEnumval ( "HKEY_LOCAL_MACHINE\software\microsoft\windows\CurrentVersion\run",$i)
$errortumble=@error


msgbox(0,"test",$regval & " - " & IniRead ($db,$regval,"Confirmed","Not In Database"))


$i=$i+1
until $regval="" and $errortumble=-1
Link to comment
Share on other sites

  • Moderators

Um... what's not working?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...