windows 在 Program Files 与 Appdata 中安装

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12427245/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 09:52:31  来源:igfitidea点击:

Installing in Program Files vs. Appdata

windowsinstallerinstallation

提问by Ra.

What are the benefits and downsides of installing an application in the user's AppData directory?

在用户的 AppData 目录中安装应用程序有什么好处和坏处?

I assume that installing in AppData will let users in restricted environments be able to install and use the application.

我假设在 AppData 中安装将使受限环境中的用户能够安装和使用该应用程序。

采纳答案by mirhagk

One of the benefits of installing to Program Files is that is exactly where the user expects it to go. Usually users go here first to look where the program is installed. The biggest downside is that the user needs administrative privileges, which isn't always required by the program.

安装到 Program Files 的好处之一是这正是用户期望它去的地方。通常用户会先到这里查看程序的安装位置。最大的缺点是用户需要管理权限,而程序并不总是需要这些权限。

You are correct in assuming installing to AppData will let restricted users install and use the application. It also will follow the user around on network systems, allowing them to have access to the program from any machine they log into with the same account. This is also a downside however since it means 2 or 3 users on a machine will have 2 or 3 versions of it installed.

您假设安装到 AppData 将允许受限用户安装和使用该应用程序是正确的。它还将在网络系统上跟踪用户,使他们可以从使用同一帐户登录的任何机器上访问该程序。然而,这也是一个缺点,因为这意味着一台机器上的 2 或 3 个用户将安装 2 或 3 个版本。

Google installs its products to AppData, which is great since it can then be installed by any user (including at schools where the computers are stuck with IE6 or something).

Google 将其产品安装到 AppData,这很棒,因为它可以由任何用户安装(包括在计算机上使用 IE6 或其他东西的学校)。

You should use AppData for any configuration, or program files that will change with the program. I personally prefer installing programs to Program Files, because that's where users assume it will be installed, and it requires admin permissions, which is usually set for a reason, and abiding by those permissions is just nice for an app to do. Ultimately it's up to you, but the default should probably just be Program Files.

您应该将 AppData 用于将随程序更改的任何配置或程序文件。我个人更喜欢安装程序而不是 Program Files,因为这是用户认为它会被安装的地方,并且它需要管理员权限,这通常是有原因的,遵守这些权限对应用程序来说很好。最终取决于您,但默认设置可能只是 Program Files。

回答by TheRaven

Generally appears that the "Appdata" directory equates to the user software directory someone might notice using Linux systems; hadn't paid too much attention to the shift from Program Files directory installations toward the increasingly popular Appdata folder, but it slowly dawns on me.

通常看来,“Appdata”目录等同于使用 Linux 系统的人可能会注意到的用户软件目录;没有过多关注从 Program Files 目录安装到日益流行的 Appdata 文件夹的转变,但我慢慢地意识到了这一点。

Thread is a bit old, but relevant considering that Windows is still pretty active; Program Files installations are mostly for your touchy apps --the ones that you will want a bit more access control over like maintenance and security apps. Your Appdata folder is pretty much any other "user" specific soft like media players, text editors; etc. The "administrator" of a Windows installation will also benefit from using appdata for "normal" software along the same lines as not installing software in the root directory while administering a Linux, Mac or BSD system.

Thread 有点旧,但考虑到 Windows 仍然非常活跃;Program Files 安装主要用于您的敏感应用程序——您需要对其进行更多访问控制的应用程序,例如维护和安全应用程序。您的 Appdata 文件夹几乎是任何其他“用户”特定软件,如媒体播放器、文本编辑器;等。Windows 安装的“管理员”也将受益于将 appdata 用于“普通”软件,就像在管理 Linux、Mac 或 BSD 系统时不在根目录中安装软件一样。