【问题标题】:How do I list all the installed applications using python?如何使用 python 列出所有已安装的应用程序?
【发布时间】:2023-01-07 22:44:46
【问题描述】:

有什么方法可以使用 python 列出 Windows 操作系统中所有已安装的应用程序(包括 MS office 应用程序).​​..?

我希望输出为应用程序列表:

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

【问题讨论】:

标签: python python-3.x list automation


【解决方案1】:

有一个专门用于该任务的 python 包:https://pypi.org/project/windows-tools.installed-software/

您可以通过在终端中执行 pip install windows_tools.installed_software 来安装包,然后您只需导入 get_installed_software 函数并相应地调用它,如下所示:

from windows_tools.installed_software import get_installed_software

for software in get_installed_software():
    print(software['name'], software['version'], software['publisher'])

【讨论】:

猜你喜欢
  • 1970-01-01
  • 2010-10-22
  • 2017-11-13
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-05-29
  • 2018-07-21
  • 1970-01-01
相关资源
最近更新 更多