Tuesday, 15 February 2011

get list of installed programs and their path in in listbox in c# -



get list of installed programs and their path in in listbox in c# -

this question exact duplicate of:

getting exe name of installed programs in c#? 3 answers

i want list of installed programs in scheme in string , corresponding path in string when click on name in list box programme should executed. here code i've tried seems give names not location of program.

string registry_key = @"software\microsoft\windows\currentversion\uninstall"; using(microsoft.win32.registrykey key = registry.localmachine.opensubkey(registry_key)) { foreach(string subkey_name in key.getsubkeynames()) { using(registrykey subkey = key.opensubkey(subkey_name)) { console.writeline(subkey.getvalue("displayname")); } } }

that registry key have info related uninstall. not know actual name or location of programme executable.

to list of install programme executable path, utilize wmi. has similar question can help you

c# list path

No comments:

Post a Comment