windows/System32 或 windows/SysWOW64 [英] windows/System32 or windows/SysWOW64
问题描述
我有一个 32 位应用程序.根据操作系统的位深度,如何正确(正式)找出安装应用程序的文件夹?如果我指示应用程序是 32 位,是否有任何 winapi 命令会给出正确的路径.
I have a 32 bit application. How correctly (officially) to find out which folder to install the application, depending on the bit depth of the OS? Are there any winapi commands that would give out the correct path, if i indicating that the application is 32 bit.
windows/System32
还是 windows/SysWOW64
?
一般来说,如果我不想检查此文件夹中的一个是否存在,该怎么做才正确?
In general, how correctly to do, if i'm not want to check if one of this folder exist?
所需的最低支持客户端 - Windows XP
.
Minimum supported client needed - Windows XP
.
推荐答案
您应该致电 SHGetKnownFolderPath
提供 FOLDERID_ProgramFiles
文件夹 ID.它将为应用程序检索正确的目录.如果你仍然想安装到system32中(虽然典型的应用程序不应该这样做),那么你可以用FOLDERID_SystemX86
调用它.
You should call SHGetKnownFolderPath
supplying FOLDERID_ProgramFiles
folder id. It will retrieve correct directory for applications. If you still want to install into system32 (though typical applications should not do it), then you can call it with FOLDERID_SystemX86
.
这篇关于windows/System32 或 windows/SysWOW64的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!