Sign in to follow this  
Followers 0
pshankland

Listing Items

4 posts in this topic

I have the following script (thanks Siao!!) which returns all the registry keys under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall and reports them individually within seperate MsgBox's. I would like to return these values within one GUI, listbox or whatever. Could someone point me in the right direction?

$i = 1
Do
    $SoftwareKey = RegEnumKey("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", $i)
    If @error <> 0 then ExitLoop
    MsgBox(4096, "SubKey #" & $i, $SoftwareKey)
$i = $i + 1
Until 0

Thanks.

Pete.

Share this post


Link to post
Share on other sites



Looking your request, the right direction is: Learn AutoIt.

Here a proof-of-concept:

#include <GUIConstants.au3>

$Form1 = GUICreate("Proof of concept", 265, 335, 193, 115)
$List1 = GUICtrlCreateList("", 16, 8, 225, 279)
$Button1 = GUICtrlCreateButton("Get list", 16, 288, 225, 25, 0)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
            
        Case $Button1
            _getList()

    EndSwitch
WEnd


Func _getList()
    $i = 1
    $listItems = ''
    Do
        $SoftwareKey = RegEnumKey("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", $i)
        If @error <> 0 Then ExitLoop
        GUICtrlSetData($List1, "SubKey #" & $i & ': ' & $SoftwareKey & '|')
        $i = $i + 1
    Until 0
EndFunc

Share this post


Link to post
Share on other sites

Thanks for the help.

I am attempting to learn AutoIT which is why I am asking questions. Have been through the help files and also looked at quite a few posts on this forum but just needed a little more help on this subject, hence the post.

Share this post


Link to post
Share on other sites

Thanks for the help.

I am attempting to learn AutoIT which is why I am asking questions. Have been through the help files and also looked at quite a few posts on this forum but just needed a little more help on this subject, hence the post.

I understand. Sorry, I'm not trying to be hard with you.

Simply that, you must take a look to Helpfile, like the examples attached there.

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