JakeJames Posted January 19, 2014 Posted January 19, 2014 Hi everyone! So basically I am looking for help on deleting multiple registry keys. I found this code by browsing the autoitforum(thanks) It displays the array, but how would I start deleting some of the entries? #include <array.au3> Global $RegTot[1][2] = [[0, 0]] For $i = 1 To 100 $var = RegEnumVal("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", $i) If @error <> 0 Then ExitLoop $var1 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", $var) ConsoleWrite($var) ConsoleWrite($var1) ; Resize the array while keeping existing elements ReDim $RegTot[$i + 1][2] $RegTot[$i][0] = $var $RegTot[$i][1] = $var1 Next _ArrayDisplay($RegTot, "Output", -1, 1)
somdcomputerguy Posted January 19, 2014 Posted January 19, 2014 See the Registry Management category in the Help file. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
l3ill Posted January 19, 2014 Posted January 19, 2014 but how would I start deleting some of the entries? RegDelete($arrayvar) at the appropriate place in your loop. What do you mean by some of the entries because this will delete the entire array one by one.... Bill My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example
JakeJames Posted January 19, 2014 Author Posted January 19, 2014 RegDelete($arrayvar) at the appropriate place in your loop. What do you mean by some of the entries because this will delete the entire array one by one.... Bill Well I want a if statement will check if the registry key contains a specific string and if it does to ignore it and delete everything else. I just dont know how to do that without deleting the whole array.
l3ill Posted January 19, 2014 Posted January 19, 2014 You got it... with an if statement. For blah If $arrayvar[$i] = (Whatever criteria to meet) Then ; Do nothing Else Regdelete($arrayvar[$i]) Next My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now