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).
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.