Resource for setting or setting folder hierarchy of various applications

Is there a website (or something else) that has information about folders and their hierarchy, where various programs and applications are installed?

Please let me explain. I am writing an application that (part of what it does) links to certain files installed by another application. To determine the file paths for these folders, I have to download and install each application separately on my development computer, search for the file I want, and then write its path in my application.

This method is very time consuming and, frankly, boring, as it requires downloading and installing each application (some are over 600MB), and then finding the required file to be able to "know" its path.

So, I was wondering if there is something that can speed up the process. for example, a website that will display such information. I tried each of the apps' own site for information, but not a cube.

Any help from you would be much appreciated. Many thanks

+2


a source to share


2 answers


If you are using Windows Installer, I would use a combination of the different search items you have. ( AppSearch , RegLocator , etc.)

In this example, using WiX , this example first looks in App Paths to find information for winword.exe

, and secondly, it ensures that the version number is at least 11 (Office 2003).



<Property Id="WORDEXE" Secure="yes">
    <RegistrySearch Id="RegSearch_WORDEXE" Root="HKLM" Key="SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Winword.exe" Type="file">
        <FileSearch Name="WINWORD.EXE" MinVersion="11.0.0.0" />
    </RegistrySearch>
</Property>

      

As long as all the apps you are looking for use the key App Paths

to expose themselves to the system, then you should be able to work from that and not even prompt the user. (This registry key is the reason you can just type winword

from the Run dialog even though it is not in the path and cannot be started from a command prompt window.)

0


a source


I know this is not particularly useful, but to answer your question directly, I highly doubt that such a site exists except for some very common programs like MS Office or any of the major operating systems.



I have to say, however, hardcoding the paths in your program seems like a pretty bad idea. What if someone using your program has one of these dependencies installed in a non-standard path? Usually everything your application needs to access should be installed in some system folder, the path of which you can get dynamically from the runtime. (At least I know this works on Linux, I'm not sure how true this is on Windows)

0


a source







All Articles