As suggested here, I need to iterate through entries in
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\
to find out the installed path of my application. How to iterate so that I can find out the
InstallLocation value given the DisplayName. How to do it efficiently in C#.
Below is code to achieve your goal:
Edit: See this method for a more comprehensive way to find an Applications Install Path, it demonstrates the
usingdisposing as suggested in the comments.https://stackoverflow.com/a/26686738/495455