I want to know the path of the installation directory of a given application (C++). The application could be any application and not necessarily the application which is being executed...
There are similar questions but everywhere they are talking about the application which is currently loaded.
There is not a common answer for your question.
Different application can have different installation path, and it has different ways to get its installation path.
Below are some suggestions for your reference.
RegQueryValue()
and SHGetSpecialFolderPath()
to get registry key and common folder.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.