Gyzmok Posted December 14, 2006 Share Posted December 14, 2006 (edited) Hi all,I want to retrieve the names (and other info) of all the software applications installed on our machines.There is an utility (free for personal use only) that does a great job in retrieving this information : Belarc advisorextract of the "installed software" result from "Belarc advisor" (converted the result.html into .txt) :...Altova - XMLSpy Version 8, 0, 0, 0 * Anwendung MapExportTNG Version 1, 0, 0, 1 * AutoIt Team - AU3Info Version 3, 2, 1, 14 * AutoIt Team - Aut2Exe Version 3, 2, 1, 14 * AutoIt Team - Exe2Aut Version 3, 2, 1, 14 * AutoIt v3 Compiled Script Version 3.0.102.0 * AutoIt v3 Script Version 3, 2, 1, 14 * AutoItV2toV3 Version 1, 0, 6, 0 * Axialis IconWorkshop Version 6, 0, 0, 0 * ...I would like to get (more or less) the same result with an autoit-script.I have tryed with this code :(post from "Firestorm")$objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") $progs = $objWMIService.ExecQuery ("Select * from Win32_Product") For $object In $progs $caption = String($object.Caption) $description = String($object.Description) $name = String($object.Name) $proginfo = String($object.Version) MsgBox(0,"progs",$caption&" "&$description&" "&$name&" "&$proginfo) Next oÝ÷ Ù©ÝjZÞiÜzÛ^®Øb±Êz,µú諨´ãÚ¶¸¨¶«¨µ«¢+Ø)¥´ÀÌØíM½ÑÝÉ)} ½µÁÕÑÉÑM½ÑÝÉ ÀÌØíM½ÑÝɤ)%ÉɽÈQ¡¸($ÀÌØíÉɽÈôÉɽÈ($ÀÌØíáѹôáѹ(%MÝ¥Ñ ÀÌØíáѹ($% ÍÄ($$%}ÉɽÉ5Í ÅÕ½ÐíÉÉ佹ѥ¹Ì¹¼Ñ¸ÅÕ½Ðì¤(%¹MÝ¥Ñ )¹%()½ÈÀÌØí¤ôÄQ¼ÀÌØíM½ÑÝÉlÁulÁtMÑÀÄ($í¥9µ¥±¥ÌµÁÑäôÐìÉÁ±¥ÐäÑ¡ÑáÐ¥¸Ñ¡ä(%¥ÀÌØíM½ÑÝÉlÀÌØí¥ulÁtôÅÕ½ÐìÅÕ½ÐìQ¡¸($$ÀÌØíM½ÑÝÉlÀÌØí¥ulÁtôÀÌØíM½ÑÝÉlÀÌØí¥ulÑt(%¹%(%5Í ½à À°ÅÕ½Ðí} ½µÁÕÑÉÑM½ÑÝÉÅÕ½Ðì°ÅÕ½Ðí9µèÅÕ½ÐìµÀìÀÌØíM½ÑÝÉlÀÌØí¥ulÁtµÀì I1µÀì|($$$ÅÕ½ÐíYÉÍ¥½¸èÅÕ½ÐìµÀìÀÌØíM½ÑÝÉlÀÌØí¥ulÅtµÀì I1µÀì|($$$ÅÕ½ÐíAÕ±¥Í¡ÈèÅÕ½ÐìµÀìÀÌØíM½ÑÝÉlÀÌØí¥ulÉtµÀì I1µÀì|($$$ÅÕ½ÐíU¹¥¹Íѱ°AÑ èÅÕ½ÐìµÀìÀÌØíM½ÑÝÉlÀÌØí¥ulÍtµÀì I1µÀì|($$$ÅÕ½ÐíQÍÐèÅÕ½ÐìµÀìÀÌØíM½ÑÝÉlÀÌØí¥ulÑt¤)9áÐ($$($$)Õ¹} ½µÁÕÑÉÑM½ÑÝÉ¡ åIÀÌØíM½ÑÝÉ%¹¼¤(%1½° ½¹ÍÐÀÌØíU¹%¹ÍÑ-ä$ôÅÕ½Ðí!-e}1= 1}5 !%9ÀäÈíM=Q]IÀäÈí5¥É½Í½ÐÀäÈí]¥¹½ÝÌÀäÈí ÕÉɹÑYÉÍ¥½¸ÀäÈíU¹¥¹Íѱ°ÅÕ½Ðì(%1½°ÀÌØí¤ôÄ(%¥´ÀÌØíM½ÑÝÉ%¹½lÅulÕt($(%]¡¥±Ä($$ÀÌØíÁÁ-ä$ôI¹Õµ-ä ÀÌØíU¹%¹ÍÑ-ä°ÀÌØí¤¤($%%ÉɽȱÐìÐìÀQ¡¸á¥Ñ1½½À($%I¥´ÀÌØíM½ÑÝÉ%¹½mU ½Õ¹ ÀÌØíM½ÑÝÉ%¹¼¤¬ÅulÕt($$ÀÌØíM½ÑÝÉ%¹½lÀÌØí¥ulÁt$ôMÑÉ¥¹MÑÉ¥Á]L¡MÑÉ¥¹IÁ±¡II ÀÌØíU¹%¹ÍÑ-äµÀìÅÕ½ÐìÀäÈìÅÕ½ÐìµÀìÀÌØíÁÁ-ä°ÅÕ½Ðí¥ÍÁ±å9µÅÕ½Ð줰ÅÕ½Ðì¡Éµ½Ù½¹±ä¤ÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ð줰̤($$ÀÌØíM½ÑÝÉ%¹½lÀÌØí¥ulÅt$ôMÑÉ¥¹MÑÉ¥Á]L¡II ÀÌØíU¹%¹ÍÑ-äµÀìÅÕ½ÐìÀäÈìÅÕ½ÐìµÀìÀÌØíÁÁ-ä°ÅÕ½Ðí¥ÍÁ±åYÉÍ¥½¸ÅÕ½Ð줰̤($$ÀÌØíM½ÑÝÉ%¹½lÀÌØí¥ulÉt$ôMÑÉ¥¹MÑÉ¥Á]L¡II ÀÌØíU¹%¹ÍÑ-äµÀìÅÕ½ÐìÀäÈìÅÕ½ÐìµÀìÀÌØíÁÁ-ä°ÅÕ½ÐíAÕ±¥Í¡ÈÅÕ½Ð줰̤($$ÀÌØíM½ÑÝÉ%¹½lÀÌØí¥ulÍt$ôMÑÉ¥¹MÑÉ¥Á]L¡II ÀÌØíU¹%¹ÍÑ-äµÀìÅÕ½ÐìÀäÈìÅÕ½ÐìµÀìÀÌØíÁÁ-ä°ÅÕ½ÐíU¹¥¹Íѱ±MÑÉ¥¹ÅÕ½Ð줰̤($$ÀÌØíM½ÑÝÉ%¹½lÀÌØí¥ulÑt$ôÀÌØíÁÁ-ä($$ÀÌØí¤¬ôÄ(%]¹($($ÀÌØíM½ÑÝÉ%¹½lÁulÁtôU ½Õ¹ ÀÌØíM½ÑÝÉ%¹¼°Ä¤´Ä(%%ÀÌØíM½ÑÝÉ%¹½lÁulÁt±ÐìÄQ¡¸($%MÑÉÉ½È Ä°Ä°À¤(%¹%)¹Õ¹()Õ¹}ÉɽÉ5Í ÀÌØíµÍÍ°ÀÌØíÑ¥µôÀ¤(%5Í ½à Ðà¬ÈØÈÄÐаÅÕ½ÐíÉɽÈÌÌìÅÕ½Ðì°ÀÌØíµÍÍ°ÀÌØíÑ¥µ¤)¹Õ¹(But both results are not even close to the "Belarc" result. (in terms of the amount of installed software it can find)Any suggestions on how to get all(or most) of the installed software info with an autoit-script (without using the belarc...) ? Edited December 14, 2006 by Gyzmok D2charkeeper = No more 'expired characters' in D2.File Date Changer = Change the file date(s), attributes and the filename case of multiple files @ once.Updater_full = Copy/Update your autoitscripts, pictures, .mp3, .avi etc ... subdirs from your PC to your memory stick or to your external harddisk. Now with scheduling and logging.Questmapper Link to comment Share on other sites More sharing options...
ptrex Posted December 14, 2006 Share Posted December 14, 2006 Hi all, I want to retrieve the names (and other info) of all the software applications installed on our machines. There is an utility (free for personal use only) that does a great job in retrieving this information : Belarc advisor extract of the "installed software" result from "Belarc advisor" (converted the result.html into .txt) : ... Altova - XMLSpy Version 8, 0, 0, 0 * Anwendung MapExportTNG Version 1, 0, 0, 1 * AutoIt Team - AU3Info Version 3, 2, 1, 14 * AutoIt Team - Aut2Exe Version 3, 2, 1, 14 * AutoIt Team - Exe2Aut Version 3, 2, 1, 14 * AutoIt v3 Compiled Script Version 3.0.102.0 * AutoIt v3 Script Version 3, 2, 1, 14 * AutoItV2toV3 Version 1, 0, 6, 0 * Axialis IconWorkshop Version 6, 0, 0, 0 * ... I would like to get (more or less) the same result with an autoit-script. I have tryed with this code : (post from "Firestorm") $objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") $progs = $objWMIService.ExecQuery ("Select * from Win32_Product") For $object In $progs $caption = String($object.Caption) $description = String($object.Description) $name = String($object.Name) $proginfo = String($object.Version) MsgBox(0,"progs",$caption&" "&$description&" "&$name&" "&$proginfo) Next oÝ÷ Ù©ÝjZÞiÜzÛ^®Øb±Êz,µú諨´ãÚ¶¸¨¶«¨µ«¢+Ø)¥´ÀÌØíM½ÑÝÉ)} ½µÁÕÑÉÑM½ÑÝÉ ÀÌØíM½ÑÝɤ)%ÉɽÈQ¡¸($ÀÌØíÉɽÈôÉɽÈ($ÀÌØíáѹôáѹ(%MÝ¥Ñ ÀÌØíáѹ($% ÍÄ($$%}ÉɽÉ5Í ÅÕ½ÐíÉÉ佹ѥ¹Ì¹¼Ñ¸ÅÕ½Ðì¤(%¹MÝ¥Ñ )¹%()½ÈÀÌØí¤ôÄQ¼ÀÌØíM½ÑÝÉlÁulÁtMÑÀÄ($í¥9µ¥±¥ÌµÁÑäôÐìÉÁ±¥ÐäÑ¡ÑáÐ¥¸Ñ¡ä(%¥ÀÌØíM½ÑÝÉlÀÌØí¥ulÁtôÅÕ½ÐìÅÕ½ÐìQ¡¸($$ÀÌØíM½ÑÝÉlÀÌØí¥ulÁtôÀÌØíM½ÑÝÉlÀÌØí¥ulÑt(%¹%(%5Í ½à À°ÅÕ½Ðí} ½µÁÕÑÉÑM½ÑÝÉÅÕ½Ðì°ÅÕ½Ðí9µèÅÕ½ÐìµÀìÀÌØíM½ÑÝÉlÀÌØí¥ulÁtµÀì I1µÀì|($$$ÅÕ½ÐíYÉÍ¥½¸èÅÕ½ÐìµÀìÀÌØíM½ÑÝÉlÀÌØí¥ulÅtµÀì I1µÀì|($$$ÅÕ½ÐíAÕ±¥Í¡ÈèÅÕ½ÐìµÀìÀÌØíM½ÑÝÉlÀÌØí¥ulÉtµÀì I1µÀì|($$$ÅÕ½ÐíU¹¥¹Íѱ°AÑ èÅÕ½ÐìµÀìÀÌØíM½ÑÝÉlÀÌØí¥ulÍtµÀì I1µÀì|($$$ÅÕ½ÐíQÍÐèÅÕ½ÐìµÀìÀÌØíM½ÑÝÉlÀÌØí¥ulÑt¤)9áÐ($$($$)Õ¹} ½µÁÕÑÉÑM½ÑÝÉ¡ åIÀÌØíM½ÑÝÉ%¹¼¤(%1½° ½¹ÍÐÀÌØíU¹%¹ÍÑ-ä$ôÅÕ½Ðí!-e}1= 1}5 !%9ÀäÈíM=Q]IÀäÈí5¥É½Í½ÐÀäÈí]¥¹½ÝÌÀäÈí ÕÉɹÑYÉÍ¥½¸ÀäÈíU¹¥¹Íѱ°ÅÕ½Ðì(%1½°ÀÌØí¤ôÄ(%¥´ÀÌØíM½ÑÝÉ%¹½lÅulÕt($(%]¡¥±Ä($$ÀÌØíÁÁ-ä$ôI¹Õµ-ä ÀÌØíU¹%¹ÍÑ-ä°ÀÌØí¤¤($%%ÉɽȱÐìÐìÀQ¡¸á¥Ñ1½½À($%I¥´ÀÌØíM½ÑÝÉ%¹½mU ½Õ¹ ÀÌØíM½ÑÝÉ%¹¼¤¬ÅulÕt($$ÀÌØíM½ÑÝÉ%¹½lÀÌØí¥ulÁt$ôMÑÉ¥¹MÑÉ¥Á]L¡MÑÉ¥¹IÁ±¡II ÀÌØíU¹%¹ÍÑ-äµÀìÅÕ½ÐìÀäÈìÅÕ½ÐìµÀìÀÌØíÁÁ-ä°ÅÕ½Ðí¥ÍÁ±å9µÅÕ½Ð줰ÅÕ½Ðì¡Éµ½Ù½¹±ä¤ÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ð줰̤($$ÀÌØíM½ÑÝÉ%¹½lÀÌØí¥ulÅt$ôMÑÉ¥¹MÑÉ¥Á]L¡II ÀÌØíU¹%¹ÍÑ-äµÀìÅÕ½ÐìÀäÈìÅÕ½ÐìµÀìÀÌØíÁÁ-ä°ÅÕ½Ðí¥ÍÁ±åYÉÍ¥½¸ÅÕ½Ð줰̤($$ÀÌØíM½ÑÝÉ%¹½lÀÌØí¥ulÉt$ôMÑÉ¥¹MÑÉ¥Á]L¡II ÀÌØíU¹%¹ÍÑ-äµÀìÅÕ½ÐìÀäÈìÅÕ½ÐìµÀìÀÌØíÁÁ-ä°ÅÕ½ÐíAÕ±¥Í¡ÈÅÕ½Ð줰̤($$ÀÌØíM½ÑÝÉ%¹½lÀÌØí¥ulÍt$ôMÑÉ¥¹MÑÉ¥Á]L¡II ÀÌØíU¹%¹ÍÑ-äµÀìÅÕ½ÐìÀäÈìÅÕ½ÐìµÀìÀÌØíÁÁ-ä°ÅÕ½ÐíU¹¥¹Íѱ±MÑÉ¥¹ÅÕ½Ð줰̤($$ÀÌØíM½ÑÝÉ%¹½lÀÌØí¥ulÑt$ôÀÌØíÁÁ-ä($$ÀÌØí¤¬ôÄ(%]¹($($ÀÌØíM½ÑÝÉ%¹½lÁulÁtôU ½Õ¹ ÀÌØíM½ÑÝÉ%¹¼°Ä¤´Ä(%%ÀÌØíM½ÑÝÉ%¹½lÁulÁt±ÐìÄQ¡¸($%MÑÉÉ½È Ä°Ä°À¤(%¹%)¹Õ¹()Õ¹}ÉɽÉ5Í ÀÌØíµÍÍ°ÀÌØíÑ¥µôÀ¤(%5Í ½à Ðà¬ÈØÈÄÐаÅÕ½ÐíÉɽÈÌÌìÅÕ½Ðì°ÀÌØíµÍÍ°ÀÌØíÑ¥µ¤)¹Õ¹( But both results are not even close to the "Belarc" result. (in terms of the amount of installed software it can find) Any suggestions on how to get all(or most) of the installed software info with an autoit-script (without using the belarc...) ? There are UDF's for this in the Example script section of the forum. Look for CompInfo.au3 There are examples provided with it. regards ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
Gyzmok Posted December 14, 2006 Author Share Posted December 14, 2006 (edited) Tnx ptrex,But in the second autoit code in my post (post from "JSThePatriot"),the function "_ComputerGetSoftware" is extracted from "CompInfo.au3" (and changed by me just a little bit)CompInfo treatYes, "CompInfo.au3" does a great job and most of the functions in there are done with WMI scripting,except the "_ComputerGetSoftware" function. (uses the registry)The problem is : even thou _ComputerGetSoftware does a great job,how is it possible that the "Belarc" tool finds even more installed software on a machine.How do they do it ?Can it be done with an autoit script too ? Edited December 14, 2006 by Gyzmok D2charkeeper = No more 'expired characters' in D2.File Date Changer = Change the file date(s), attributes and the filename case of multiple files @ once.Updater_full = Copy/Update your autoitscripts, pictures, .mp3, .avi etc ... subdirs from your PC to your memory stick or to your external harddisk. Now with scheduling and logging.Questmapper Link to comment Share on other sites More sharing options...
ptrex Posted December 14, 2006 Share Posted December 14, 2006 Reading the reg keys gives you the same as if you would go to control panel and press add/remove software. If they find more software installed, they probably read the folder C:\Program Files\. And everything listed in there. There are function in AU3 to list content of folders and subfolders. is that what you need ? Regards ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
JSThePatriot Posted December 14, 2006 Share Posted December 14, 2006 @ptrexIt seems from Gyzmok's post from Belarc is going through the @ProgramFilesDir, and searching for all .exe's. When AutoIt is installed the list doesn't contain the 6 items listed, it normally would only have one entry.AutoIt Team - AU3Info Version 3, 2, 1, 14AutoIt Team - Aut2Exe Version 3, 2, 1, 14AutoIt Team - Exe2Aut Version 3, 2, 1, 14AutoIt v3 Compiled Script Version 3.0.102.0AutoIt v3 Script Version 3, 2, 1, 14AutoItV2toV3 Version 1, 0, 6, 0@GyzmokFollow my example above, and search through the entire @ProgramFilesDir to find all executable files. That will be the list they have. (Or atleast it seems). You will need to use some UDF's to obtain file version information.BTW, thanks for using my Library.I hope this helps,JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
Gyzmok Posted December 14, 2006 Author Share Posted December 14, 2006 @ptrex and JSThePatriot you both gave me a nice idea : going through the @ProgramFilesDir and look for the executables. But this would produce a long list with lots of .exe's that are only small utility programs, used by their main application and I don't see all of those in the "Belarc" list. (they must have "filtered" it somehow) Thanks a lot for the responses and I should thank you JS for that nice CompInfo.au3 D2charkeeper = No more 'expired characters' in D2.File Date Changer = Change the file date(s), attributes and the filename case of multiple files @ once.Updater_full = Copy/Update your autoitscripts, pictures, .mp3, .avi etc ... subdirs from your PC to your memory stick or to your external harddisk. Now with scheduling and logging.Questmapper Link to comment Share on other sites More sharing options...
JSThePatriot Posted December 14, 2006 Share Posted December 14, 2006 @ptrex and JSThePatriotyou both gave me a nice idea : going through the @ProgramFilesDir and look for the executables. But this would produce a long list with lots of .exe's that are only small utility programs, used by their main applicationand I don't see all of those in the "Belarc" list. (they must have "filtered" it somehow)Thanks a lot for the responsesand I should thank you JS for that nice CompInfo.au3In your sample list it has all the "helper" exe's that are installed with AutoIt, but I haven't ever used Belarc, so I am sure they have filtered it some how. Maybe just grab the exe's in the main directory not sub directories, or something similar. Utilities are normally in sub directories.You are more than welcome for the responses,JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) 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