Installed app path

Is there a way for me to detect if an application is installed on the user's system, and if it is, what the installation path is Obviously, some programs are not "proper citizens" in Windows and don't register themselves properly, but I'm more concerned about mainstream ones that supposedly do, like Word and Excel.



Answer this question

Installed app path

  • D. Wille

    You can always scan the HKLM\Software\Microsoft\Windows\Current Version\Uninstall\

    Not every entry has the application path though.


    Dustin


  • Geoff Darst

    Thanks. That link is very helpful. I actually did have that path in my registry, but wasn't looking in the proper place. I can't figure out how to use the Installer Object Model, but the second link is helpful. However, this doesn't help me with my real problem, which is - how do I get the path of the installed app. Now that I know if a program is installed, how do I find the installation path I noticed some of those entries have an InstallLocation key, but not all of them do. Is there another step I can do to find this info out

    Also, for finding out info about Excel or Word, the above technique isn't going to be reliable, because it's installed under the name "Microsoft Office", and I have no way of knowing if their Office installation included Excel or Word, (since each application can be chosen not to be installed).


  • Patti Biggs

    Here's a link to a specific Windows Installer Scripting Sample: http://msdn.microsoft.com/library/default.asp url=/library/en-us/msi/setup/list_products_properties_features_and_components.asp

     

    This should provide sample code that will allow you to see if a particular product/component is installed and get the path (via ComponentPath). Once you know the ComponentID of MSWord.Exe and MSExcel.EXE, you can determine if and where they are installed.

     



  • Herbert Hoover

    If it is installed via Windows Installer, you can use the Products function in the Windows Installer Object Model:

    http://msdn.microsoft.com/library/default.asp url=/library/en-us/msi/setup/installer_products.asp

     

    Here is a document on using the Uninstall RegKey...

    http://support.microsoft.com/default.aspx scid=kb;en-us;821775

     



  • Dr Sardon

    My registry doesn't have an 'Uninstall' key (or subfolder) in 'HKLM\Software\Microsoft\Windows\Current Version'.


  • Installed app path