Home » Get the installed applications on your PC using python

Get the installed applications on your PC using python

Spring Framework Basics Video Course
1 Year Subscription
Java SE 11 Programmer II [1Z0-816] Practice Tests
Java SE 11 Programmer I [1Z0-815] Practice Tests
Oracle Java Certification
Java SE 11 Developer (Upgrade) [1Z0-817]

In this article we take a look at a library to display a list of the apps  that you have installed

Table of Contents

Installation

pip install winapps

Example

import winapps

for app in winapps.list_installed():
    print(app)

When run here were just a couple of apps that I have installed

InstalledApplication(name='Microsoft Visual C++ 2013 Redistributable (x86) – 12.0.30501′, version='12.0.30501.0′, install_date=None, install_location=None, install_source=None, modify_path='”C:\\ProgramData\\Package Cache\\{f65db027-aff3-4070-886a-0d87064aabb1}\\vcredist_x86.exe” /modify', publisher='Microsoft Corporation', uninstall_string='”C:\\ProgramData\\Package Cache\\{f65db027-aff3-4070-886a-0d87064aabb1}\\vcredist_x86.exe” /uninstall')
InstalledApplication(name='Intel(R) C++ Redistributables on Intel(R) 64′, version='15.0.179′, install_date=datetime.date(2022, 11, 18), install_location=”, install_source=WindowsPath(‘C:/adobeTemp/ETR4C3A.tmp/1/support/keyfiles/CustomHook/win'), modify_path='MsiExec.exe /X{F70BCE36-25F2-4475-A918-6209B3D85BF3}', publisher='Intel Corporation', uninstall_string='MsiExec.exe /X{F70BCE36-25F2-4475-A918-6209B3D85BF3}')
InstalledApplication(name='Microsoft Visual C++ 2008 Redistributable – x86 9.0.21022′, version='9.0.21022′, install_date=datetime.date(2018, 5, 15), install_location=”, install_source=WindowsPath(‘c:/ec256aee873b2c710af302ee57′), modify_path='MsiExec.exe /X{FF66E9F6-83E7-3A3E-AF14-8DE9A809A6A4}', publisher='Microsoft Corporation', uninstall_string='MsiExec.exe /X{FF66E9F6-83E7-3A3E-AF14-8DE9A809A6A4}')

Now we can also search the apps that are installed

import winapps

for searchapp in winapps.search_installed('OBS Studio'):
    print(searchapp)

When run I saw this

InstalledApplication(name='OBS Studio', version='23.2.1′, install_date=None, install_location=None, install_source=None, modify_path=None, publisher='OBS Project', uninstall_string='C:\\Program Files\\obs-studio\\uninstall.exe')

You can also uninstall an app that is installed on your system

import winapps

# Assuming you have only one installed OBS Studio
[obs] = winapps.search_installed('OBS Studio')
obs.uninstall('/S')

# Simpler universal variant (uninstall all OBS Studio applications)
winapps.uninstall('OBS Studio', args=['/S'])

 

You may also like

Leave a Comment

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More