1

I would like to get list of installed programs as shown in Add/Remove Programs of the control panel using C sharp

I know using SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall (32bit) or SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall (64bit) can get program names but how to get its exe file name?

Example MS Word is the program name which the above mentioned registers help me to get but its application file is winword.exe. I need to get this information so that I can start those applications through the code

Edited: I need to to get the list of installed programs along with their exe information so that when user selects that program name from my application I should be able to trigger that application

Madhu Velayudhan
  • 59
  • 1
  • 2
  • 8
  • 1
    possible duplicate of [C#: How to get installing programs exactly like in control panel programs and features?](http://stackoverflow.com/questions/15524161/c-how-to-get-installing-programs-exactly-like-in-control-panel-programs-and-fe) – Xaruth Feb 24 '14 at 10:11
  • Don't think that's possible as what you install is a `software package` not a `program (single exe file)` – Ankur Feb 24 '14 at 10:35
  • @Ankur; Don't say that not possible. (Its possible but a little harder to achieve it. I shall post the answer soon when I get it. I am almost close to achieve it.). I din't knew that its a software package, i was thinking it was single program(single exe) :-P Thanks for your answer – Madhu Velayudhan Feb 24 '14 at 10:38
  • The problem would be to verify that the solution you come up works with all the software packages available for window ;) – Ankur Feb 24 '14 at 10:52

1 Answers1

0


Windows Add/Remove does not contain that kind of information.
Let's take Office as an example, you install a whole package, having excel.exe, winword.exe among others.
What you could do, is cross that information with the one available from the Start Menu, where most of the shortcuts are.
Most people don't delete the Start Menu shortcuts, so maybe it is an option.
Another one, would be to read the installation folder and filter out every .exe

Check this for executing lnk: c# memory usage for starting lnk shortcuts

Community
  • 1
  • 1
Filipe YaBa Polido
  • 1,656
  • 1
  • 17
  • 39