Moderators big_daddy Posted January 17, 2006 Moderators Share Posted January 17, 2006 So far I'm able to make it list some of the keys, but it gives a blank name on several that do have names. If I can get that issue figured out then I need to build an array to store all the key values and then create a listview from that. Any help on this would be great. #include <RegCount.au3> #include <Constants.au3> opt("MustDeclareVars", 1) HotKeySet("{Esc}", "Stop") Dim $Key = "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall" Dim $TotalKeys = _RegKeyCount($Key) For $i = 1 to $TotalKeys Dim $var = RegEnumKey($Key, $i) If @error <> 0 then ExitLoop Dim $List = RegRead($Key & "\" & $var, "DisplayName") MsgBox(4096, "Display Name", "Key " & $i & " " & $List) Next Exit Func Stop() Exit EndFunc This is the RegCount UDF Link to comment Share on other sites More sharing options...
Micha1405 Posted January 17, 2006 Share Posted January 17, 2006 May be this sample is helping you. I'm not the perfect programmer but you will be able to filter the entries with no Display Name. Use AutoIt Beta >3.1.1..88 #include <RegCount.au3> #include <Constants.au3> #include <Array.au3> #include <GUIConstants.au3> #include <GuiList.au3> opt("MustDeclareVars", 1) HotKeySet("{Esc}", "Stop") Dim $mainWindows,$var,$App,$ulist,$MSG,$but1,$Lvar,$i,$ret $app="Display Uninstall" $mainWindows=GUICreate($App, 800, 400,-1,-1) $ulist=GUICtrlCreateList ("", 10,40,640,350,-1,-1) $but1=GUICtrlCreateButton("Read Registry",10,10) GUISetState(@SW_SHOW) ; While 1;Run Gui until it closed $msg = GUIGetMsg() Select Case $msg=$but1 ReadKeys() case $MSG=$GUI_EVENT_CLOSE Exit EndSelect WEnd Func ReadKeys() Dim $Key = "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall" Dim $TotalKeys = _RegKeyCount($Key) ;MsgBox(0,"",$TotalKeys) Dim $List[$TotalKeys] For $i = 1 to $TotalKeys $var = RegEnumKey($Key, $i) If @error <> 0 then ExitLoop $List[$i-1] = RegRead($Key & "\" & $var, "DisplayName") if $list[$i-1]="" then $List[$i-1]="No Display Name" $Lvar=GUICtrlSetData($ulist,$List[$i-1]&" / "&$var) Next $ret = _GUICtrlListCount ($ulist) ; _ArrayDisplay( $List, "_ArrayDisplay() Test" );Display the Array msgbox(0,"",$ret &" entry in listbox") EndFunc Func Stop() Exit EndFunc My TrayToolBar Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted January 18, 2006 Author Moderators Share Posted January 18, 2006 Thank for the sample, it helped out a lot. Link to comment Share on other sites More sharing options...
Lakes Posted June 17, 2006 Share Posted June 17, 2006 Thank for the sample, it helped out a lot.Do you have the RegCount UDF, could you send it to me please?I want to get a list of installed programs.Thanks! 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
Xenobiologist Posted June 17, 2006 Share Posted June 17, 2006 Hi, in my PCInfo script is a func which writes the list to a file. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Lakes Posted June 17, 2006 Share Posted June 17, 2006 Hi,in my PCInfo script is a func which writes the list to a file.So long,MegaThanks Mega! 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
Xenobiologist Posted June 17, 2006 Share Posted June 17, 2006 Thanks Mega! No prob! So long,MegaHope it helped out ... Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted June 19, 2006 Author Moderators Share Posted June 19, 2006 Do you have the RegCount UDF, could you send it to me please?I want to get a list of installed programs.Thanks!Theres the link to the finished product. Link to comment Share on other sites More sharing options...
Lakes Posted June 19, 2006 Share Posted June 19, 2006 Theres the link to the finished product.Thanks Big D! 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted June 19, 2006 Author Moderators Share Posted June 19, 2006 Thanks Big D! No problem. 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