michelepizzi

How I Can Check If App Installed

Apr 6th, 2020
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. I would open regedit and navigate to that path.
  2.  
  3. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall...
  4.  
  5. First, make sure that the name is there. If its not then that is the issue.
  6.  
  7. It could also be that the key you are looking for is going to look like HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{0B0BA4A44-B2AB-4B28-9A45-CBE2BFC5FFD1}
  8.  
  9. If this is the case then you would need to iterate through each item in Registry.LocalMachine.OpenSubKey("SOFTWARE").OpenSubKey("Microsoft").OpenSubKey("Windows").OpenSubKey("CurrentVersion").OpenSubKey("Uninstall") and then look for the wanted DisplayName. (see Iterate through registry entries)
  10.  
  11. Just as a note, since you would be looking for "Mozilla Firefox 38.0.1 (x86 en-GB)" then if anything is not exact on another PC then it will not find it. Like if the version is 38.0.2 for example or if the browser is an EN version in the US. I would look at Mark Shevchenko comment for the best general checking. Using the uninstall path might not be that reliable.
Advertisement
Add Comment
Please, Sign In to add comment