用于安装或设置各种应用程序文件夹层次结构的资源

发布于 2024-08-30 11:14:31 字数 346 浏览 3 评论 0 原文

是否有一个网站(或其他网站)提供有关安装了各种程序和应用程序的文件夹及其层次结构的信息?

请让我解释一下。我正在编写一个应用程序(它的部分功能)引用其他应用程序安装的某些文件。为了能够确定这些文件夹的文件路径,我必须在我的开发电脑上单独下载并安装每个应用程序,搜索我想要的文件,然后将其路径写入我的应用程序。

这种方法非常耗时,坦率地说,也很无聊,因为它需要下载并安装每个应用程序(其中一些超过 600MB),然后找到所需的文件只是为了能够“知道”其路径。

所以,我想知道是否有什么可以加快速度。例如,一个包含此类信息的网站。我尝试了每个应用程序自己的网站来获取信息,但没有成功。

非常感谢您的任何帮助。 非常感谢

Is there a web site (or something else) that has information on 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) references certain files installed by other application. To be able to determine the file paths for these folders I have to download and install each application seperatly on my development pc, 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 of them in excess of 600MB) and then locating the required file just to be able to "know" its path.

So, I was wondering if there is something that could speed things up. like, for example, a website that would have such information. I tried each of the applications own website for information but no dice.

Any help from you will be much appreciated.
Many thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

花伊自在美 2024-09-06 11:14:31

如果您使用的是 Windows Installer,我将使用您可用的各种搜索元素的组合。 (AppSearchRegLocator 等)

以下是使用 WiX 代码,此特定示例首先在 应用程序路径注册表位置可以查找winword.exe的详细信息,其次确保版本号至少为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>

只要您正在搜索的所有应用程序都使用App Paths键将自身暴露给系统,那么您应该能够从此向后工作,甚至不需要提示用户。 (此注册表部分是您可以从“运行”对话框中输入 winword 的原因,即使它不在路径中并且无法从命令提示符窗口运行。)

If you're using Windows Installer, I would use a combination of the various search elements you have available. (AppSearch, RegLocator, etc.)

Here's an example using WiX code, this particular example first looks in the App Paths registry location to find the details for winword.exe, 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 applications you're searching for are using the App Paths key to expose themselves to the system then you should be able to work backwards from that and not even need to prompt the user. (This registry section is the reason you can just enter winword from the "Run" dialog even though it's not in the path and can't be run from a command prompt window.)

少跟Wǒ拽 2024-09-06 11:14:31

我知道这并不是特别有帮助,但为了直接回答您的问题,我非常怀疑这样的网站是否存在,除了某些非常常见的程序(例如 MS Office 或任何主要操作系统本身)。

不过,我不得不说,对程序中的路径进行硬编码似乎是一个相当糟糕的主意。如果使用您的程序的人将这些依赖项之一安装在非标准路径中怎么办?通常,您的应用程序需要访问的任何内容都应安装在某种系统文件夹中,您可以从运行时环境动态获取其路径。 (至少我知道它在Linux上是这样工作的,我不确定它在Windows上到底在多大程度上是正确的)

I know this isn't especially helpful, but to answer your question directly, I highly doubt that such a website exists, except for certain very common programs like MS Office or any of the major operating systems itself.

I have to say, though, hard-coding the paths in your program seems like a rather bad idea. What if someone using your program has one of these dependencies installed in a non-standard path? Normally anything your application would need to access should be installed in some sort of system folder whose path you can get dynamically from the runtime environment. (At least I know it works this way on Linux, I'm not sure to exactly what extent it's true on Windows)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文