-1

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 Answers2

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'])
  • 1
    This is a link only answer, you should edit and explain how to use the package in relation to what OP is asking. – Cow Jan 07 '23 at 13:46
  • @user56700 the usage seemed trivial so I skipped it but I added it nonetheless. That being said, isn't this a duplicate of https://stackoverflow.com/questions/53132434/list-of-installed-programs anyways? – Javier Flores Jan 07 '23 at 14:03
  • You could try to install `pip install windows-tools`, and this should let you continue. – Amir Md Amiruzzaman May 27 '23 at 00:29
0

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"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall")

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)