I would like to query Windows using the file extension as a parameter (for example, ".jpg") and return the path to the application windows that were configured as the default application for this file type.
Ideally, the solution would look something like this:
from stackoverflow import get_default_windows_app
default_app = get_default_windows_app(".jpg")
print(default_app)
"c:\path\to\default\application\application.exe"
I am studying the built-in winreg library, which contains registry information for windows, but I had problems understanding its structure, and the documentation is rather complicated.
I am running Windows 10 and Python 3.6.
Does anyone have any ideas to help?
source
share