我有一个问题,用户设置了他们的语言环境(德语),这与语言 Windows 安装为(英语)不同。有没有办法发现安装使用的语言窗口与用户设置的语言环境?我应该注意的问题是我正在创建一个共享,并且我根据区域设置设置了权限,因此如果用户将区域设置设置为德语,则“每个人”的权限为“Jeder”,但如果操作系统设置为英语,这将失败,因为这不是“Jeder”的 ID
谢谢
Windows 有“UserLanguage”和“SystemLanguage”的概念。您要的是 SystemLanguage。明白了,你就会得到正确的答案。
更新:你想要的 Win32 函数是 GetSystemDefaultUILanguage()
检索操作系统的系统默认 UI 语言的语言标识符,在 Windows Vista 及更高版本上也称为“安装语言”。
http://msdn.microsoft.com/en-us/library/dd318123(VS.85).aspx
请注意,Windows Installer 可以查询属性“SystemLanguageId”。(如果您从 instller 的角度感兴趣)
The question's title and the question itself are different issues. You're trying to create an "Everyone" SID, but you're going about it in a way that depends on the locale. The solution to your problem is to not use a locale-dependent method. Use the CreateWellKnownSid API. The MSDN page on CreateWellKnownSid even has code for creating an Everyone SID.
我想您可以枚举安装的语言包,但可能无法检索安装期间使用的语言,除非您有权访问安装日志。
为什么要针对“Everyone”或“Jeder”这个词进行编码?没有可以检查的变量吗?