pshankland Posted July 4, 2007 Share Posted July 4, 2007 I am trying to use AutoIT to find out what software has been installed onto machines - a software audit program basically. Could someone please point me in the right direction? I have managed to do this with VBS but was wondering if there was anything within AutoIT that would do the job? Thanks. Pete. Link to comment Share on other sites More sharing options...
Siao Posted July 4, 2007 Share Posted July 4, 2007 (edited) Do a RegEnumKey loop in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall. Some programs write uninstall info to HKCU instead of HKLM, so might wanna RegEnumKey that too, but to get such list for all users that are not logged-in would be a bit more problematic. Edited July 4, 2007 by Siao "be smart, drink your wine" Link to comment Share on other sites More sharing options...
pshankland Posted July 4, 2007 Author Share Posted July 4, 2007 Thanks, have now got the following but (noob question I know) how do I continue the loop until all the available registry keys have been displayed rather than just 10? For $i= 1 to 10 $SoftwareKey = RegEnumKey("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", $i) If @error <> 0 then ExitLoop MsgBox(4096, "SubKey #" & $i, $SoftwareKey) Next Thanks. Link to comment Share on other sites More sharing options...
Siao Posted July 4, 2007 Share Posted July 4, 2007 Use this loop: $i = 1 Do $SoftwareKey = RegEnumKey("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", $i) If @error <> 0 then ExitLoop MsgBox(4096, "SubKey #" & $i, $SoftwareKey) $i += 1 Until 0 "be smart, drink your wine" Link to comment Share on other sites More sharing options...
pshankland Posted July 4, 2007 Author Share Posted July 4, 2007 Thanks, works like a charm I have been trying now to read the DisplayName value from each on of the keys returned so used the following:$i = 1 Do $SoftwareKey = RegEnumKey("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", $i) $DisplayName = RegRead($SoftwareKey, "DisplayName") If @error <> 0 then ExitLoop MsgBox(4096, "SubKey #" & $i, $SoftwareKey & " - " & $DisplayName) $i = $i + 1 Until 0Unfortunatly, this dosn't return anything. I commented-out the If @error line and did get a MsgBox back for each Key but no DisplayName value was returned.Am I expecting this to be easier than it should be Thanks. Link to comment Share on other sites More sharing options...
Rickbert Posted July 4, 2007 Share Posted July 4, 2007 Two things... One: You need to move your $displayname = .... line AFTER the If @error .... line. Two: The REGENUMKEY only returns the key, not the whole hive string, so your $displayname line needs to be like this: $DisplayName = RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" & $SoftwareKey, "DisplayName") Hope this helps Link to comment Share on other sites More sharing options...
pshankland Posted July 4, 2007 Author Share Posted July 4, 2007 Brilliant, thanks for the help. Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted July 5, 2007 Moderators Share Posted July 5, 2007 This may be worth taking a look at as well.Uninstall Apps Link to comment Share on other sites More sharing options...
weaponx Posted July 5, 2007 Share Posted July 5, 2007 Check out MyUninstaller from NirSoft, it's light years beyond Add / Remove programs and it's free.http://www.nirsoft.net/utils/myuninst.html 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