colafrysen Posted March 24, 2009 Share Posted March 24, 2009 (edited) Hi, I am scripting a function for my computer that will work like Vistas "Run box" (the one that's embedded in the start menu). so what I need right now is to get a list off all the installed programs on my computer, with corresponding Paths to each programs main .exe I've looked through 2 ways which both gave me the names of all installed programs. Nr1 : expandcollapse popupFunc _InstalledSoftware($s_RemoteComputer = '') Local $Count = 1 If $s_RemoteComputer <> '' Then If StringMid($s_RemoteComputer, 1, 1) <> '\' Or StringMid($s_RemoteComputer, 2, 1) <> '\' Or StringRight($s_RemoteComputer, 1) <> '\' Then $s_RemoteComputer = '\\' & StringReplace($s_RemoteComputer, '\', '') & '\' EndIf EndIf Local Const $regkey = $s_RemoteComputer & 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall' While 1 $key = RegEnumKey ($regkey, $Count) If @error <> 0 then ExitLoop $line = RegRead ($regkey & '\' & $key, 'Displayname') $line = StringReplace ($line, ' (remove only)', '') If $line <> '' Then If Not IsDeclared('avArray') Then Dim $avArray[1] ReDim $avArray[UBound($avArray) + 1] $avArray[0] = UBound($avArray) - 1 $avArray[UBound($avArray) - 1] = $line EndIf $Count = $Count + 1 WEnd If Not IsDeclared('avArray') Then SetError(1) Return('') Else SetError(0) Return($avArray) EndIf EndFuncoÝ÷ ØÞrçmêÞ+-¯)èµìmz{"½érjwmê'+ax"~§w¬¶©jØm¢Ø^{-jY^v趦²éâËZSkÙ«¢+ØÀÌØí½5åÉɽÈô=©Ù¹Ð ÅÕ½ÐíÕѽ%йÉɽÈÅÕ½Ðì°ÅÕ½Ðí5åÉÉÕ¹ÅÕ½Ðì¤((ÀÌØí1¥ÍÐô}M½ÑÝÉ1¥ÍÐ ¤)}ÉÉå¥ÍÁ±ä ÀÌØí1¥ÍФ((ÀÌØí1¥ÍÐô}M½ÑÝÉ1¥ÍÐ Ìäí5¥É½Í½Ð=¥AɽÍÍ¥½¹°¥Ñ¥½¸ÈÀÀÌäì¤)}ÉÉå¥ÍÁ±ä ÀÌØí1¥ÍФ()Õ¹}M½ÑÝÉ1¥ÍÐ ÀÌØíÍM½ÑÝÉ9µôÌäìÌäì¤(¥´ÀÌØíM½ÑÝÉ1¥ÍÑlÅulÉt(ÀÌØí½©%¹Íѱ±Èô=© ÉÑ Ìäí]¥¹½ÝÍ%¹Íѱ±È¹%¹Íѱ±ÈÌäì¤((ÀÌØíAɽÕÑÌôÀÌØí½©%¹Íѱ±È¹AɽÕÑÌ(½ÈÀÌØíAɽÕÐ%¸ÀÌØíAɽÕÑÌ(%ÀÌØíÍM½ÑÝÉ9µ±ÐìÐìÌäìÌäì¹ÀÌØíÍM½ÑÝÉ9µ±ÐìÐìÀÌØí½©%¹Íѱ±È¹AɽÕÑ%¹¼ ÀÌØíAɽÕаÌäíAɽÕÑ9µÌäì¤Q¡¸ ½¹Ñ¥¹Õ1½½À(I¥´ÀÌØíM½ÑÝÉ1¥ÍÑmU ½Õ¹ ÀÌØíM½ÑÝÉ1¥ÍФ¬ÅulÉt(ÀÌØíM½ÑÝÉ1¥ÍÑmU ½Õ¹ ÀÌØíM½ÑÝÉ1¥ÍФ´ÅulÁtôÀÌØí½©%¹Íѱ±È¹AɽÕÑ%¹¼ ÀÌØíAɽÕаÌäíAɽÕÑ9µÌäì¤(ÀÌØíM½ÑÝÉ1¥ÍÑmU ½Õ¹ ÀÌØíM½ÑÝÉ1¥ÍФ´ÅulÅtôÀÌØí½©%¹Íѱ±È¹AɽÕÑ%¹¼ ÀÌØíAɽÕаÌäíYÉÍ¥½¹MÑÉ¥¹Ìäì¤(9áÐ(ÀÌØíM½ÑÝÉ1¥ÍÑlÁulÁtôU ½Õ¹ ÀÌØíM½ÑÝÉ1¥ÍФ´Ä(%ÀÌØíM½ÑÝÉ1¥ÍÑlÁulÁtôÀQ¡¸ÀÌØíM½ÑÝÉ1¥ÍÐôÌäìÌäì(IÑÕɸ ÀÌØíM½ÑÝÉ1¥ÍФ)¹Õ¹ìôôÐí}M½ÑÝÉ1¥ÍÐ()Õ¹5åÉÉÕ¹ ¤(ÀÌØí!á9ÕµÈô!à ÀÌØí½5åÉɽȹ¹ÕµÈ°à¤( ½¹Í½±]É¥Ñ ÅÕ½Ðí]¥¹ÑÉÁÑ =4ÉɽÈÌÌìÅÕ½ÐìµÀì I1µÀì|(ÅÕ½Ðí9յȥÌèÅÕ½ÐìµÀìÀÌØí!á9յȵÀì I1µÀì|(ÅÕ½Ðí]¥¹ÍÉ¥ÁÑ¥½¸¥ÌèÅÕ½ÐìµÀìÀÌØí½5åÉɽȹݥ¹ÍÉ¥ÁÑ¥½¸¤((MÑÉÉ½È Ä¤ìͽµÑ¡¥¹Ñ¼¡¬½ÈÝ¡¸Ñ¡¥Ìչѥ½¸ÉÑÕɹÌ)¹Õ¹ìôôÐí5åÉÉÕ¹ Could I by chance get the path to the main .exe from function nr 2? Or can anyone think of another way? Edited March 24, 2009 by colafrysen [font="Impact"]Use the helpfile, It´s one of the best exlusive features of Autoit.[/font]http://support.microsoft.com/kb/q555375ALIBI Run - a replacement for the windows run promptPC Controller - an application for controlling other PCs[size="1"]Science flies us to the moon. Religion flies us into buildings.[/size][size="1"]http://bit.ly/cAMPZV[/size] 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