Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 755
  • Last Modified:

How can I find installation path of a program from registry?

Hi all, I'm looking for a way to find the installation path of a program installed on my computer.

I know the product code so I can browse the key in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{D74A349A-E733-4920-873F-C048370E1250}, but installation path is not defined as a value inside.

The UninstallString value contains "MsiExec.exe /I{D74A349A-E733-4920-873F-C048370E1250}", can I use this to find the installation path?

Thanks by advance,
Julien
0
JulienVan
Asked:
JulienVan
  • 7
  • 3
  • 3
  • +1
1 Solution
 
speshalystCommented:
Look Under HKLM\ClassesRoot\Installer\Product..
 
 
0
 
JulienVanAuthor Commented:
I looked into this key but my product code isn't listed in.
0
 
speshalystCommented:
did u run a search on the registry to find other matches.. other than the one u have mentioned on ur question
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
JulienVanAuthor Commented:
Thanks for the reply, yes I made a search with my product code, my installation path, and the program name, and also with 'Installer', but I don't think that the information I'm looking for is stored in registry.
It would be interesting to know where Windows Installer store information used for uninstalling programs...
0
 
jcimarronCommented:
JulienVan--What is the product?  MsiExec.exe  is Windows Installer.
If your goal is to uninstall the program, use Control Panel|Add/Remove or Windows Installer Cleanup Utility.  http://support.microsoft.com/default.aspx?scid=kb;en-us;290301
0
 
jcimarronCommented:
JulienVan--This reference suggests that not all programs have an uninstall string
http://michaelellerbeck.com/2008/04/25/how-to-find-the-uninstall-string-to-uninstall-a-program-from-the-command-line/
This may especially be the case if Windows Installer was not used in installing the program.
Perhaps also of interest
http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_23036532.html
0
 
JulienVanAuthor Commented:
Hi jcimarron,

Thanks for your help, in fact the product is a .NET application built with Visual Studio.
And i'd like to detect the installation path, to create an automatic patch dedicated to a specific version of this software.

If Windows Installer knows how to uninstall the program and delete the files, it means that this information is stored at a place no? So maybe we can find an access to this information too...
0
 
jcimarronCommented:
JulienVan--I wonder if this app is under HKEY_CLASSES_ROOT\Installer\Assemblies
Is this something you have created?
0
 
JulienVanAuthor Commented:
Hi jcimarron,
This application isn't in HKEY_CLASSES_ROOT\Installer\Assemblies.
Yes it's something I have created. Since now I can add this information in registry for next installations, but it would be good if I could find it to create a patch for the last distributed release.
0
 
souseranCommented:
Try this Microsoft app: Installation Monitor (instaler_setup.exe):

This command-line tool tracks changes that are made by Setup programs in any secondary processes that they start. It includes changes to registry entries, to files and to .ini file entries. Installation Monitor creates an IML file that documents all those changes, together with enough information to undo all the changes. To download this tool, click the following link:

http://download.microsoft.com/download/win2000platform/instaler/1.00.0.1/NT5/EN-US/instaler_setup.exe

It installs to Program Files\Resource Kit and the instaler_d.htm file there describes how to use it.
0
 
JulienVanAuthor Commented:
Hi souseran,

Thanks for the link, I tried to use it from Windows XP command line, but an error occurres: QueryDosDeviceW( NULL ) failed (122)

I used a command as specified in the help file:
instaler <filename> <setuppath>
0
 
souseranCommented:
Sorry about that. Wrong tool. That one is for Windows 2k and doesn't work in XP. This one does.

http://digilander.libero.it/rareware/inctrl5.zip

Usage instructions here:

http://www.pcmag.com/article2/0,2817,1159174,00.asp
0
 
JulienVanAuthor Commented:
Hey souseran thank you, this application is magic!

I found a new track, this registry key contains all the paths to my application, with a value by product code (each version):
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-21-1593360796-597931833-1333511047-1005\Components\AB22858342B04DCD5E18D9687DFAA0C9

I think it will permit me to find what I'm looking for if I determinate user's SID in my patch code (http://www.microsoft.com/technet/scriptcenter/resources/qanda/dec04/hey1203.mspx) or loop on all user IDs.

Thanks again for your help,
Julien
0
 
JulienVanAuthor Commented:
Thanks souseran!
0
 
souseranCommented:
JulienVan:

Glad it worked. Thanks for the points and the good grade. :-)

souseran
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 7
  • 3
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now