ALTIN 0 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 Share this post Link to post Share on other sites
Necromorph 1 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. Share this post Link to post Share on other sites
UEZ 1,273 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Share this post Link to post Share on other sites
ALTIN 0 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 Share this post Link to post Share on other sites