Is there a way to find the path of an application with standard libraries?
问题 I'd like to know if it is possible to find the installation directory of an application under Windows 7, such as MS Excel, with standard python 2.7 libraries. I mean, it shouldn't use any pywin32, or xlrd etc. Maybe it will look up registry to find the installation path? 回答1: It might be quite tricky, however one approach would be to search for the launcher exe location in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\foo.exe Thusly something like this (I do not have Windows on