• package: tis-sysinternals-bginfo
  • name: BGInfo
  • version: 4.31-1
  • categories: Utilities,System and network
  • maintainer: WAPT Team,Tranquil IT,Gaëtan SEGAT
  • editor: Microsoft Systernal
  • locale: all
  • target_os: windows
  • impacted_process: Bginfo,Bginfo64
  • architecture: all
  • signature_date:
  • size: 2.34 Mo
  • installed_size: 7.97 Mo
  • homepage : https://docs.microsoft.com/en-us/sysinternals/downloads/bginfo
  • conflicts :

package           : tis-sysinternals-bginfo
version           : 4.31-1
architecture      : all
section           : base
priority          : optional
name              : BGInfo
categories        : Utilities,System and network
maintainer        : WAPT Team,Tranquil IT,Gaëtan SEGAT
description       : BGInfo is a software specialized in the display of all information concerning the PC and its components. The difference with its counterparts is that the information is readable from the desktop.
depends           : 
conflicts         : tis-bginfo
maturity          : PROD
locale            : all
target_os         : windows
min_wapt_version  : 2.0
sources           : https://download.sysinternals.com/files/BGInfo.zip
installed_size    : 7966720
impacted_process  : Bginfo,Bginfo64
description_fr    : BGInfo est un logiciel spécialisé dans l'affichage de toutes les informations concernant le PC et ses composants. La différence avec ses homologues est que les renseignements sont lisibles depuis le bureau.
description_pl    : BGInfo to oprogramowanie specjalizujące się w wyświetlaniu wszelkich informacji dotyczących komputera i jego komponentów. Od swoich odpowiedników różni się tym, że informacje są możliwe do odczytania z poziomu pulpitu
description_de    : BGInfo ist eine Software, die auf die Anzeige aller Informationen über den PC und seine Komponenten spezialisiert ist. Der Unterschied zu seinen Gegenstücken ist, dass die Informationen vom Desktop aus lesbar sind
description_es    : BGInfo es un software especializado en la visualización de toda la información relativa al PC y sus componentes. La diferencia con sus homólogos es que la información es legible desde el escritorio
description_pt    : BGInfo é um software especializado na exibição de todas as informações relativas ao PC e aos seus componentes. A diferença em relação aos seus equivalentes é que a informação é legível a partir do ambiente de trabalho
description_it    : BGInfo è un software specializzato nella visualizzazione di tutte le informazioni relative al PC e ai suoi componenti. La differenza con le sue controparti è che le informazioni sono leggibili dal desktop
description_nl    : BGInfo is een software die gespecialiseerd is in het weergeven van alle informatie betreffende de PC en zijn componenten. Het verschil met zijn tegenhangers is dat de informatie leesbaar is vanaf het bureaublad
description_ru    : BGInfo - это программное обеспечение, специализирующееся на отображении всей информации, касающейся ПК и его компонентов. Отличие от аналогов заключается в том, что информация читается с рабочего стола
audit_schedule    : 
editor            : Microsoft Systernal
keywords          : System,component
licence           : 
homepage          : https://docs.microsoft.com/en-us/sysinternals/downloads/bginfo
package_uuid      : 69b71079-27c6-4ea0-a839-bac073ecd999
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://docs.microsoft.com/en-us/sysinternals/downloads/bginfo
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 172d2e5a20b0544c7d3cfc5d7712ff8fc0239f6ee1f117701ea987741f158cae
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature         : Rv2s8LIx6/gzWQ31AZY7lCV93xn0tb5l8NAIWfVRe1FvTg9MTK+urcAh9UAZRVpheav7Xipc4M6ABuefiOpeJkXAoGTPWm0Bs0Pg4ei/E2JKCW49/MSlqV7pvbtdXwo6PHvXvwqg3Tcjnt7T05/ApDOQbNIr2vy8kL30BgQnUlAVAmB/n4mJQlwwJk9U1WVRbgmUerU42TWZQxBT6Js7ZDPuUYkSltHObxOW1k5Zj9XBvvnq5fQ4lOt8fy4frj1FlKEn7IHoONuE5D8xv3UjrKN9M8yg+cWG0LMIz8zysry8oO3DXp75dgNYHjB5rcy7dapCbFCH+YaJpCExEG5t3g==
signature_date    : 2022-08-04T15:02:23.121610
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes

# -*- coding: utf-8 -*-
from setuphelpers import *
import platform

r"""
Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()

"""
# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls
bin_contains = "BGInfo"
app_name = "BGInfo"
app_binx86 = "BGInfo.exe"
app_binx64 = "BGInfo64.exe"
app_dir = makepath(programfiles, app_name)
launch_path = makepath(startup(common=1), "BGInfo.lnk")
launch_arg = r' /accepteula "%s\tis-default.bgi" /timer:0' % app_dir


def install():
    # Initializing variables
    package_version = control.version.split("-")[0]
    bin_latest_zip = glob.glob("*%s*.zip" % bin_contains)[0]
    app_name = control.name

    # Getting installed software version
    if iswin64:
        app_bin = app_binx64
    else:
        app_bin = app_binx86
    app_bin_path = makepath(app_dir, app_bin)

    if isfile(app_bin_path):
        installed_version = get_version_from_binary(app_bin_path)
    else:
        installed_version = None

    # Installing the package
    print("Installing: %s" % app_name)
    if installed_version is None or installed_version < package_version or force:
        killalltasks(control.get_impacted_process_list())
        if isdir(app_dir):
            remove_tree(app_dir)
        mkdirs(app_dir)
        print("Extract %s to %s " % (bin_latest_zip, app_dir))
        unzip(bin_latest_zip, app_dir)
        filecopyto("tis-default.bgi", app_dir)

        # Create shortcut on start menu
        create_shortcut(launch_path, app_bin_path, launch_arg)
        # create_desktop_shortcut(app_name,app_bin_path)
        create_programs_menu_shortcut(app_name, app_bin_path)

        # Adding this package to the "list-registry"
        register_windows_uninstall(control)  # control is a PackageEntry object corresponding to this package
        register_uninstall(app_name, icon=app_bin_path)
    else:
        print("%s portable version is already installed in the correct version" % app_name)


def uninstall():
    # Uninstalling software
    killalltasks(control.get_impacted_process_list())
    unregister_uninstall(app_name)

    # Removing shortcuts
    remove_desktop_shortcut(app_name)
    remove_programs_menu_shortcut(app_name)

    # Remove folder and auto start
    if isdir(app_dir):
        remove_tree(app_dir)

    if isfile(launch_path):
        remove_file(launch_path)


def audit():
    # Declaring local variables
    package_version = control.get_software_version()
    # Getting installed software version
    if iswin64:
        app_bin = app_binx64
    else:
        app_bin = app_binx86
    app_bin_path = makepath(app_dir, app_bin)

    # Getting installed software version
    if isfile(app_bin_path):
        installed_version = get_version_from_binary(app_bin_path)
    else:
        installed_version = None

    # Auditing software
    print("Auditing: %s" % control.package)
    if installed_version is None or installed_version < package_version:
        print("%s version is incorrect (%s)" % (app_name, installed_version))
        return "ERROR"
    else:
        print("%s is installed in correct version (%s)" % (app_name, installed_version))
        return "OK"


def update_package():
    # Initializing variables
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    url_dl = "https://download.sysinternals.com/files/BGInfo.zip"
    bin_latest_zip = url_dl.split("/")[-1]
    print("Download url is: %s" % url_dl)

    # Downloading latest binaries
    if isfile(bin_latest_zip):
        remove_file(bin_latest_zip)

    print("Downloading: %s" % bin_latest_zip)
    wget(url_dl, bin_latest_zip, proxies=proxies)

    # Unzip
    unzip(bin_latest_zip)

    # Changing version of the package
    version = get_version_from_binary(makepath(app_name, app_binx86))
    control.version = "%s-%s" % (version, control.version.split("-", 1)[-1])
    control.save_control_to_wapt()
    print("Changing package version to: %s in WAPT\\control" % control.version)

    # Remove extract
    remove_tree(app_name)

e4e32d771407a8502023cf1b9cae3140eaf67b2e8810d2e531acb3f2b9d85eff : setup.py
e9ad4a9a8365c8b308bdd5ab408bd9039f175b83101c076f3912c1d2b59d4aaf : BGInfo.zip
172d2e5a20b0544c7d3cfc5d7712ff8fc0239f6ee1f117701ea987741f158cae : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
d39aa76ebef0b7d72ffe1378b1f50fb1b2a6eb4b6407cd3ed343736f3804e956 : luti.json
c70872532b2f1110e54f8d3745efc474a2f46f7bc4a1d027dfd03451c5522601 : tis-default.bgi
38fb2b3a41b56de5ee2e512a0067652a96c5c08808b413a8d376e947b1fa80c5 : WAPT/control