ALTIN Posted November 5, 2010 Share Posted November 5, 2010 (edited) Hello guys, i need a way to get all values that are under a specific registry key, for example all values underHKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run.I know I can use RegRead ( "keyname", "valuename" ) by specifying the "valuename" but i want to get all these valuenames under the specific "keyname" in this case under RunIs there something im missing?? I can't figure out any simple way....thanks for any help... Edited November 5, 2010 by ALTIN Link to comment Share on other sites More sharing options...
Necromorph Posted November 5, 2010 Share Posted November 5, 2010 this is not going to answser you question entirely, but i did something simalar once to find all the installed instaces of SQL like this $instanceName = "MSSQLSERVER" $x = 0 Do $x += 1 $instances = RegEnumVal("HKLM\SOFTWARE\Microsoft SQL Server\Instance Names\SQL", $x) Until @error <> 0 Or $instances = $instanceName so, i know it doesn't do exactly what you need, but you can mold it into what you do need it to do. it does read all the values in a key, so you could do like FileWriteLine($hFile, $instances) for each $value. Good luck. hopefully it helps. Link to comment Share on other sites More sharing options...
UEZ Posted November 5, 2010 Share Posted November 5, 2010 Have a look here: It is easy to adapt the script for your need. Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
ALTIN Posted November 5, 2010 Author Share Posted November 5, 2010 (edited) Hey @redLabel & @UEZ, thanks so much, with your help I got what i was missing: RegEnumVal() is what i needed and actually does the job.Here is what I have now and that is the solution:For $i = 1 to 100 $var = RegEnumVal("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", $i) if @error <> 0 Then ContinueLoop MsgBox(4096, $var, RegRead("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", $var)) Next Edited November 5, 2010 by ALTIN mr-es335 1 Link to comment Share on other sites More sharing options...
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