Sign in to follow this  
Followers 0
ghetek

Registy array

8 posts in this topic

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?

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

oh wait... RegEnumVal ah ok... now i feel kinda dumb

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

1 thing

_FileCreate (@SystemDir & "\startuplist.ini2")

$dbenum = @SystemDir & "\startuplist.ini2"

.ini2 ?????

nopper

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Um... what's not working?


[center]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.[/center]

Share this post


Link to post
Share on other sites

also

until $regval="" and $errortumble=-1

should be

until $regval="" Or $errortumble=-1

8)


NEWHeader1.png

Share this post


Link to post
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
Sign in to follow this  
Followers 0