skip to Main Content

is there any way to list all the installed application (including MS office applications) in windows OS using python…?

I expect the output as list of applications:

Telegram
Brave
Whatsapp
MS word
& all the applications installed...

2

Answers


  1. There’s a python package specifically for that task: https://pypi.org/project/windows-tools.installed-software/

    You can install the package by executing pip install windows_tools.installed_software in your terminal and then you just have to import the get_installed_software function and call it accordingly, like so:

    from windows_tools.installed_software import get_installed_software
    
    for software in get_installed_software():
        print(software['name'], software['version'], software['publisher'])
    
    Login or Signup to reply.
  2. As @ekhumoro commented, you can get it from the windows registry. Using python you can try something like this:

    import winreg
    
    reg = winreg.ConnectRegistry(None, winreg.HKEY_LOCAL_MACHINE)
    key = winreg.OpenKey(reg, r"SOFTWAREMicrosoftWindowsCurrentVersionUninstall")
    
    for i in range(winreg.QueryInfoKey(key)[0]):
        software_key_name = winreg.EnumKey(key, i)
        software_key = winreg.OpenKey(key, software_key_name)
        try:
            software_name = winreg.QueryValueEx(software_key, "DisplayName")[0]
            print(software_name)
        except Exception as e:
            print(e)
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search