Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 812
  • Last Modified:

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?
0
Sebastion
Asked:
Sebastion
  • 2
1 Solution
 
2266180Commented:
>>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?

sadly for you: no. you can locate the root paths, based on the uninstall location, but that's all.
some programs install themselves like:

root\bin\application.exe
root\uninstall.exe

and of course that "bin" can be any directory.

other programs are like

root\uninstall.exe
root\somedll.dll

and they are just addons for some other applications, but they do have their own installer/uninstaller

and some programs just install themselves without leaving uninstallation programs. they basically jsut copy soem files to program files and maybe registering something in the registry and that's all.
they usually use their own custom installers so you cannot track them.

so basically, you can get a list of uninstall paths that will link to some things that are not standalone applications, some will point to service applications (which of course the user doesn't need to start/stop explicitly), and some of the installed applications wil not even be there.

moreover, some applications can bve installed anywhere on the system so using the program files is not a good solution either.

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.

or, maybe you want to do something and this is not the right idea to do it? what do you actually try to acomplish? maybe we can give you a better solution.
0
 
SebastionAuthor Commented:
>>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.
0
 
2266180Commented:
I see what you want to do. sorry to say that this is a dead end.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now