Skip to main content

Python library for managing installed applications on Windows

Project description

winapps - Python library for managing installed applications on Windows

License PyPI - Python Version PyPI

Installation

To install winapps from PyPI run:

$ pip install winapps

Or clone it using git:

$ git clone https://github.com/rominf/winapps.git
$ cd winapps
$ python(3) setup.py install

Usage

Printing installed applications

import winapps

for app in winapps.list_installed():
    print(app)
# InstalledApplication(name='7-Zip 19.00 (x64)', version='19.00', install_date=None, install_location=WindowsPath('C:/Program Files/7-Zip'), install_source=None, modify_path=None, publisher='Igor Pavlov', uninstall_string='C:\\Program Files\\7-Zip\\Uninstall.exe')
# InstalledApplication(name='Mozilla Firefox 66.0.2 (x64 ru)', version='66.0.2', install_date=None, install_location=WindowsPath('C:/Program Files/Mozilla Firefox'), install_source=None, modify_path=None, publisher='Mozilla', uninstall_string='"C:\\Program Files\\Mozilla Firefox\\uninstall\\helper.exe"')
# InstalledApplication(name='Mozilla Maintenance Service', version='66.0.2', install_date=None, install_location=None, install_source=None, modify_path=None, publisher='Mozilla', uninstall_string='"C:\\Program Files (x86)\\Mozilla Maintenance Service\\uninstall.exe"')
# InstalledApplication(name='Oracle VM VirtualBox Guest Additions 6.0.4', version='6.0.4.0', install_date=None, install_location=None, install_source=None, modify_path=None, publisher='Oracle Corporation', uninstall_string='C:\\Program Files\\Oracle\\VirtualBox Guest Additions\\uninst.exe')
# InstalledApplication(name='Python 3.7.1 (Miniconda3 4.5.12 64-bit)', version='4.5.12', install_date=None, install_location=None, install_source=None, modify_path=None, publisher='Anaconda, Inc.', uninstall_string='"C:\\ProgramData\\Miniconda3\\Uninstall-Miniconda3.exe"')
# InstalledApplication(name='TortoiseHg 4.9.0 (x64)', version='4.9.0', install_date=datetime.date(2019, 4, 3), install_location=WindowsPath('C:/Program Files/TortoiseHg'), install_source=WindowsPath('C:/Users/Roman Inflianskas/Downloads'), modify_path='MsiExec.exe /I{9DF3A4E8-0C61-49CC-9170-79B0DE20EF25}', publisher='Steve Borho and others', uninstall_string='MsiExec.exe /I{9DF3A4E8-0C61-49CC-9170-79B0DE20EF25}')
# ...

Searching applications

import winapps

for app in winapps.search_installed('tortoisehg'):
    print(app)

Uninstalling applications

import winapps

# Assuming you have exactly one installed Notepad++
[npp] = winapps.search_installed('Notepad++')
npp.uninstall('/S')

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

Caveats

The library currently lookups only for software installed for all users. Only Windows Installer 3.0 .exe installers are supported in installer_command, install, and uninstall are supported.

Credits

This library is heavily inspired by win_pkg SaltStack module.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

winapps-0.2.0.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

winapps-0.2.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file winapps-0.2.0.tar.gz.

File metadata

  • Download URL: winapps-0.2.0.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.9.2 Linux/5.11.10-200.fc33.x86_64

File hashes

Hashes for winapps-0.2.0.tar.gz
Algorithm Hash digest
SHA256 12ffd0cea3a2802cecd65b83091e23aef0cc98ad4f7e0d0178ace7814e18bbb1
MD5 31563df60b77748f825359d6433a985c
BLAKE2b-256 ddc0715e5a20541187d7b8ebdf5a72fe6bff5f1d508c351908d707c881f4dd3e

See more details on using hashes here.

File details

Details for the file winapps-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: winapps-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.9.2 Linux/5.11.10-200.fc33.x86_64

File hashes

Hashes for winapps-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eaabaab9e239a57014b511c08ec4dd37afd9982f477fee47955fbdd2c9592ad8
MD5 31092ad5c831eefbb3a8039bb95978f3
BLAKE2b-256 e8d1200d4c9416da5337e1b9c4f1d297687ba35c70d9f59881889929e0d743d3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page