Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
848 views
in Technique[技术] by (71.8m points)

c++ - windows/System32 or windows/SysWOW64

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 or windows/SysWOW64?

In general, how correctly to do, if i'm not want to check if one of this folder exist?

Minimum supported client needed - Windows XP.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...