Is there a standard location for architecture-independent shared program files on Windows?

六眼飞鱼酱① 提交于 2020-05-31 18:05:32

问题


So all x86 code normally resides under %ProgramFiles(x86)% folder, while x64 code resides under the %ProgramFiles% folder.

Many applications, especially when installed in two variants, one for each architecture and in their respective folders, would share and depend on a number of assets that aren't code and to which the concept of CPU architecture doesn't apply. That would be assets of all kinds -- documentation, help and localization files, multimedia, perhaps etc.

Is there a preferred location reserved for such files, so that an application that is installed in two variants like above, doesn't have to maintain two identical sets of assets for no good reason at all?

%ProgramData% seems to be an ill-fit because, for one thing, it's designed to be writable by regular users, something that isn't safe with regard to often critical application assets interesting candidate since its ACEs effectively allow only creator of a folder therein to modify it and any files they may create in the latter.

For comparison, on Linux-based systems, there has been just the thing for such assets, quoting section 4.11 of the "Filesystem Hierarchy Standard":

The /usr/share hierarchy is for all read-only architecture independent data files.
...
Any program or package which contains or requires data that doesn't need to be modified should store that data in /usr/share.

I'd like to know if there is one like that on Windows? As an application developer (and application end-user) I am reserved about storing assets somewhere like C:\<folder-name> or another equally poor location.

来源:https://stackoverflow.com/questions/61736933/is-there-a-standard-location-for-architecture-independent-shared-program-files-o

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!