Link to home
Start Free TrialLog in
Avatar of Sebastion
Sebastion

asked on

List of Installed Programs + Executable Paths

Hi,

I did abit of searching and although I found a solution to list the installed programs I couldn't find any information on getting the executable paths of those installed programs.

Basically the plan is to create a combo box or list box that'll display all the installed programs and allow the user to start the selected program.

Getting a list of installed programs from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall is relatively sufficient, but there's nothing in there to allow me to execute the program afterwards.  There is a "InstallLocation" in most of the keys, but most of the programs do not have an entry in there.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths seems to contain the path details for the programs, but I don't see any way to link the values there up with the display names listed under the uninstall keys.  Likewise, not all the programs are listed under there anyway, such as Blizzard's Diablo 2 or Starcraft games.  Those games seem to have their paths listed under SOFTWARE\Blizzard\.

So is there a way to not only get a list of all installed programs, but also locate the paths to be able to execute them if the user selects it?
ASKER CERTIFIED SOLUTION
Avatar of 2266180
2266180
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sebastion
Sebastion

ASKER

>>I cannot think of any reason for why anyone would want to make a program that runs installe dprograms. why not make the user palce some shortucts, or add select the program and you provide a list or buttons? makes more sense and there are already such applications too.

Awhile ago (we're talking about 5+ months), a friend of had shown me a website where users post their customised desktops, and although I wasn't really interested I did like the icon-less aspect.  At the moment, I have alot of my programs on the quicklaunch, which is set to auto-hide on the left hand side of the screen, but space on that is limited.

The plan with this program was to make something that'll sit in the bottom corner near the time and allow me access to any program I designate with the click of a button.  Added functionality that I wanted to try later on was to be able to specify the username//password to execute the program as (or leave empty if the current user is desired), and possibly even designate a shortcut key to execute it without using the mouse at all (or even to right-click on my program and then press the shortcut to execute the shortcut).  Finally, some programs allow for extra commands to be used in conjunction with the exe, such as outlooks /safe mode.   But I guess I'm getting ahead of myself here, as I have a pretty good idea of how I'm going to do those anyway.

To begin with, I wanted to simply have a way to add an installed program's name & path to my program.  My backup plan was indeed to simply have a browse button and allow the me to navigate to the exe, then give it the name I wanted, but my initial plan was to have a drop down box that simply allowed me to choose from all the installed programs (and my program would be able to automatically locate it's install path and other details).  It would appear that this isn't possible as it seems like you might not even get all of the programs installed to begin with.  

For the record, I'm not sure if there is any program out there that does this or not (there probably is) but that's not really a big concern to me.  The purpose of me writing this program for myself is more-so to allow me to become more familiar with Delphi programming, and for a bonus to give me some extra flexibility with my computer.

I'll leave this question open for another couple of hours incase there any other responses, but if it is indeed impossible (or incredibly difficult) to do then I'll close it and accept your answer.
I see what you want to do. sorry to say that this is a dead end.