Page 1 of 1

Detect a directory Crystal Report or Office

Posted: Fri Jul 01, 2011 4:57 pm
by Merops
Hello,

I have to copy files in the directory CrystalReport (eg C:\Program Files\Seagate Software\Crystal Reports).
How to detect that directory can vary from one computer to another ?

Similarly, a directory for Office (eg 2003, 2007, 2010).

Thank you, :wink:

Franck,

Re: Detect a directory Crystal Report or Office

Posted: Fri Jul 01, 2011 5:06 pm
by giaviv
Hi,

You have a few options. Your best bet is to find the entry of these programs in the registry under:
HKLM\SOFTWARE\WINDOWS\CURRENTVERSION\UNINSTALL

There, you will find the entry that appears in the Uninstall Programs in your control panel.
Parse the UninstallString value. This value points to where the uninstallation program is. Since it is usually located in the main installation directory, parse this value to get the installed directory.