tis-trusted-key-manager icon

Trusted Key Manager

Silent install package for Trusted Key Manager

2.0.0-4

  • package: tis-trusted-key-manager
  • name: Trusted Key Manager
  • version: 2.0.0-4
  • categories: Security
  • maintainer: WAPT Team,Tranquil IT,Clément BAZIRET,Jimmy PELÉ
  • editor: Certeurope
  • licence: proprietary_free,wapt_public
  • locale: all
  • target_os: windows
  • impacted_process: Trusted Key Manager
  • architecture: x64
  • signature_date:
  • size: 155.73 Mo
  • installed_size: 279.87 Mo
  • homepage : https://support.certeurope.fr/

package           : tis-trusted-key-manager
version           : 2.0.0-4
architecture      : x64
section           : base
priority          : optional
name              : Trusted Key Manager
categories        : Security
maintainer        : WAPT Team,Tranquil IT,Clément BAZIRET,Jimmy PELÉ
description       : Electronic Certificate creator software made by Certeurope
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : windows
min_wapt_version  : 2.3
sources           : https://support.certeurope.fr/installer-tkm/
installed_size    : 279873807
impacted_process  : Trusted Key Manager
description_fr    : Logiciel de création de certificats électroniques réalisé par Certeurope
description_pl    : Oprogramowanie do tworzenia certyfikatów elektronicznych firmy Certeurope
description_de    : Software zur Erstellung elektronischer Zertifikate von Certeurope
description_es    : Programa de creación de certificados electrónicos de Certeurope
description_pt    : Software de criação de certificados electrónicos fabricado por Certeurope
description_it    : Software per la creazione di certificati elettronici prodotto da Certeurope
description_nl    : Software voor het maken van elektronische certificaten gemaakt door Certeurope
description_ru    : Программа для создания электронных сертификатов, разработанная компанией Certeurope
audit_schedule    : 
editor            : Certeurope
keywords          : electronic,certificate,creator,software,certeurope
licence           : proprietary_free,wapt_public
homepage          : https://support.certeurope.fr/
package_uuid      : 26b1f7fa-2bae-45c5-8ecf-faef487b0524
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 10.0
max_os_version    : 
icon_sha256sum    : ff8b2b25b088e5ea64e2ff5f4b5616660ae093558f0b3ae058e3d5cfd2503181
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2024-10-14T15:00:14.000000
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
signature         : QEWjorOZmc7pV8M+exx6V88v2BRAz5fhXfAZ2BlQRdbBAnRxZeUx4he0TKliq3orxG+wvmA++eZUyCsVpH4yN0uzFY7l4Kpl8SGzkuwpEZ2YHigQ9cqTwXNknaDfzOIUigjNXlsNf4iSx/cloIF3OoAG+NjbhqfH2dEtyr+lPnC+o7yQAZSsW9h+pb5qZwTOsvjT5MZb8kG4/vVG6qQfppHEmx7DmWjFVUrZKHwN/T0/yJ6jt+6Hj06QAeDgjK3qXdJdnyAn0oIg+fZb1OiWdi9Vn5LkCouzhZrhgs5XN6/z6eiGdXYpZs0hSojyDA43glQmHdZc1OwLPdYftIshPA==

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

"""
{
    "key": "{B7789A48-5C5D-47C6-B1EF-B5990092198B}",
    "name": "Trusted Key Manager",
    "version": "1.7.3",
    "install_date": "2024-02-12 00:00:00",
    "install_location": "",
    "uninstall_string": "MsiExec.exe /I{B7789A48-5C5D-47C6-B1EF-B5990092198B}",
    "publisher": "Oodrive",
    "system_component": 0,
    "win64": true,
}
{
    "key": "TrustedKeyManager",
    "name": "Trusted Key Manager - Certeurope",
    "version": "",
    "install_date": "",
    "install_location": "",
    "uninstall_string": '"C:\\Program Files\\Certeurope\\Trusted Key Manager\\uninstall.exe"',
    "publisher": "",
    "system_component": 0,
    "win64": false,
}


"""
# C:\Users\username\AppData\Local\Trusted Key Manager\Trusted Key Manager.exe
# C:\Program Files\Trusted Key Manager
# C:\Program Files\Certeurope\Trusted Key Manager


def install():
    # bin_name = glob.glob("TrustedKeyManager64.msi")[0]
    # app_dir = makepath(programfiles, "Trusted Key Manager")
    # properties = {
    #     "APPLICATIONFOLDER": '"%s"' % app_dir,
    # }

    # install_msi_if_needed(
    #     bin_name,
    #     properties=properties,
    #     timeout=600,
    # )

    # Uninstalling older versions of the software
    for to_uninstall in installed_softwares("Trusted Key Manager"):
        if to_uninstall["version"] == "":
            continue
        if Version(to_uninstall["version"]) < Version("1.7.3") or force:  # Please check changelog.txt
            print("Removing: %s (%s)" % (to_uninstall["name"], to_uninstall["version"]))
            killalltasks(ensure_list(control.impacted_process))
            run(uninstall_cmd(to_uninstall["key"]))
            wait_uninstallkey_absent(to_uninstall["key"])
            if isdir(to_uninstall["install_location"]):
                remove_tree(to_uninstall["install_location"])

    # Installing the software
    bin_name = glob.glob("*.exe")[0]
    install_exe_if_needed(
        bin_name,
        silentflags="/S",
        key="TrustedKeyManager",
        min_version="",  # Unable to check version number
        timeout=600,
    )
    app_dir = os.path.dirname(installed_softwares("Trusted Key Manager")[0]["uninstall_string"]).strip('"')
    app_path = makepath(app_dir, "Trusted Key Manager.exe")
    if not running_as_system():
        uninstall()  # Until the uninstall function only removes shortcuts
    create_desktop_shortcut("Trusted Key Manager", app_path, wDir=app_dir)
    create_programs_menu_shortcut("Trusted Key Manager", app_path, wDir=app_dir)


def uninstall():
    # Cleanup shortcuts
    remove_desktop_shortcut("Trusted Key Manager")
    remove_programs_menu_shortcut("Trusted Key Manager")
    remove_programs_menu_folder("Oodrive")
    remove_user_desktop_shortcut("Trusted Key Manager")
    remove_user_programs_menu_shortcut("Trusted Key Manager")
    remove_user_programs_menu_folder("Oodrive")


def remove_user_programs_menu_shortcut(label, folder=None):
    """Remove a shortcut from the start menu of current user

    Args:
        label (str): label of shortcut without extension
    """
    if not (label.endswith(".lnk") or label.endswith(".url")):
        label += ".lnk"
    try:
        user_programs_menu = winshell.programs(common=0)
    except:
        user_programs_menu = makepath(application_data(), "Microsoft", "Windows", "Start Menu", "Programs")
    if isdir(user_programs_menu):
        if folder is None:
            remove_file(makepath(user_programs_menu, label))
        else:
            remove_file(makepath(user_programs_menu, folder, label))


def remove_user_programs_menu_folder(folder):
    """Remove a folder from the start menu of current user

    Args:
        folder(str): folder to remove
    """
    try:
        user_programs_menu = winshell.programs(common=0)
    except:
        user_programs_menu = makepath(application_data(), "Microsoft", "Windows", "Start Menu", "Programs")
    user_programs_menu_folder = makepath(user_programs_menu, folder)
    if isdir(user_programs_menu_folder):
        remove_tree(user_programs_menu_folder)


def remove_user_desktop_shortcut(label):
    """Remove a shortcut from the desktop of current user

    Args:
        label (str): label of shortcut without extension
    """
    if not (label.endswith(".lnk") or label.endswith(".url")):
        label += ".lnk"
    try:
        user_desktop = winshell.desktop(common=0)
    except:
        user_desktop = makepath(user_home_directory(), "Desktop")
    if isdir(user_desktop):
        remove_file(makepath(user_desktop, label))

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


def update_package():
    # Declaring local variables
    package_updated = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    update_dict = {
        "bin_contains": {
            "windows": "_Installer.exe",
            "mac": ".dmg",
        }
    }
    url = "https://support.certeurope.fr/telechargements/"

    # Getting latest version from official sources
    print("URL used is: %s" % url)
    bs_search = bs_find(url, "i", "class", "icon-download_toolbarre", proxies=proxies)
    download_url = bs_search.parent["href"]
    latest_bin = download_url.split("/")[-1]
    version = str(list(bs_search.parents)[2]).split('"column-3">')[1].split('<')[0]

    # Downloading latest binaries
    print("Latest %s version is: %s" % (control.name, version))
    print("Download URL is: %s" % download_url)
    if not isfile(latest_bin):
        print("Downloading: %s" % latest_bin)
        wget(download_url, latest_bin, proxies=proxies)
    else:
        print("Binary is present: %s" % latest_bin)

    # Deleting outdated binaries
    remove_outdated_binaries(latest_bin)
    # arch_list = ensure_list(control.architecture)
    # remove_outdated_binaries(version, filename_contains=("x64" if "x64" in arch_list else "x86" if "x86" in arch_list else []))

    # # Checking version from file
    # if get_os_name() == "Windows" and "windows" in control.target_os.lower():
    #     version_from_file = get_version_from_binary(latest_bin)
    #     if Version(version_from_file, 4) == Version(version, 4):
    #         print(f"INFO: Binary file version ({version_from_file}) corresponds to online version ({version})")
    #     else:
    #         error(f"ERROR: Binary file version ({version_from_file}) do NOT corresponds to online version ({version})")

    # Changing version of the package
    if Version(version, 4) > Version(control.get_software_version(), 4):
        print("Software version updated (from: %s to: %s)" % (control.get_software_version(), Version(version)))
        package_updated = True
    else:
        print("Software version up-to-date (%s)" % Version(version))
    control.set_software_version(version)
    control.save_control_to_wapt()

    # Validating or not update-package-sources
    return package_updated

    # # Changing version of the package and validating update-package-sources
    # return complete_control_version(control, version)

fddbf2f24220d7b1a404ab227d91da258fd3aada4960dc1e8a657a365f88c329 : CertEurope_TKM_Suite_2.0.0_Installer.exe
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
1acf56502ff0e479efe2c5faf9ce22d0e0bd1fc3cf539548210090426293db4e : WAPT/changelog.txt
ff96a6b9240269996182b709472d8cfeddfcaa7dd1ca478f925a37fb711f9e7b : WAPT/control
ff8b2b25b088e5ea64e2ff5f4b5616660ae093558f0b3ae058e3d5cfd2503181 : WAPT/icon.png
85184aa30729bce58a05ae1d5545d532c28e9de6b226736028f13a8926892eea : luti.json
b1ff0688eca32519aeb969578e02b27f2ec6b34cef6e60fb955a215508c1428d : setup.py
c8475b35d9a0154c9a1af640515ac6ebe1099377a48eca00ea2d912eaef9d5f5 : update_package.py

1.8.0-4
===
Migration de MSI vers la version EXE du logiciel comme recommandé par l'éditeur :
WINDOWS 11, 10		1.8.0	Désinstaller les anciennes versions du TKM au besoin