tis-teamviewer-portable icon

TeamViewer Portable

Paquet d’installation silencieuse pour TeamViewer Portable

15.76.5-15
Utilities
Utilities

Les paquets PREPROD sont des paquets construits via LUTI. Ils restent généralement 5 jours en PREPROD, après quoi un deuxième scan VirusTotal est effectué pour vérifier que le status n'a pas changé.
Si le paquet réussit ce dernier contrôle, il est promu en PROD et publié sur le store.

  • package: tis-teamviewer-portable
  • name: TeamViewer Portable
  • version: 15.76.5-15
  • categories: Utilities
  • maintainer: WAPT Team,Tranquil IT,Jimmy PELÉ
  • editor: TeamViewer AG
  • licence: proprietary_free,wapt_public
  • locale: all
  • target_os: windows
  • impacted_process: TeamViewer,TeamViewer_Desktop,tv_w32,tv_x64
  • architecture: all
  • signature_date:
  • size: 81.54 Mo
  • installed_size: 132.09 Mo
  • homepage : https://www.teamviewer.com

package           : tis-teamviewer-portable
version           : 15.76.5-15
architecture      : all
section           : base
priority          : optional
name              : TeamViewer Portable
categories        : Utilities
maintainer        : WAPT Team,Tranquil IT,Jimmy PELÉ
description       : TeamViewer is a remote access and remote control computer software, allowing maintenance of computers and other devices
depends           : 
conflicts         : 
maturity          : PREPROD
locale            : all
target_os         : windows
min_wapt_version  : 2.3
sources           : https://www.teamviewer.com/download/
installed_size    : 132090815
impacted_process  : TeamViewer,TeamViewer_Desktop,tv_w32,tv_x64
description_fr    : TeamViewer est un logiciel d'accès à distance et de contrôle à distance d'ordinateurs, permettant la maintenance d'ordinateurs et d'autres appareils
description_pl    : TeamViewer to oprogramowanie do zdalnego dostępu i zdalnego sterowania komputerem, umożliwiające konserwację komputerów i innych urządzeń
description_de    : TeamViewer ist eine Fernzugriffs- und Fernsteuerungssoftware, die die Wartung von Computern und anderen Geräten ermöglicht
description_es    : TeamViewer es un software de acceso remoto y control remoto de ordenadores, que permite el mantenimiento de ordenadores y otros dispositivos
description_pt    : O TeamViewer é um software de acesso remoto e controlo remoto de computadores, que permite a manutenção de computadores e outros dispositivos
description_it    : TeamViewer è un software per l'accesso e il controllo remoto del computer, che consente la manutenzione di computer e altri dispositivi
description_nl    : TeamViewer is computersoftware voor toegang op afstand en afstandsbediening, waarmee computers en andere apparaten kunnen worden onderhouden
description_ru    : TeamViewer - это программа удаленного доступа и дистанционного управления компьютером, позволяющая обслуживать компьютеры и другие устройства
audit_schedule    : 
editor            : TeamViewer AG
keywords          : 
licence           : proprietary_free,wapt_public
homepage          : https://www.teamviewer.com
package_uuid      : 98028b0d-776a-468f-93ff-4f95df1ef5c0
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://community.teamviewer.com/English/categories/change-logs-en
min_os_version    : 6.1
max_os_version    : 
icon_sha256sum    : 71d3c188b8ebd8672d0ffcb36dae22598986ef3bf83981d468779f234a617c94
signer            : test
signer_fingerprint: b82fc8ef4a4475c0f69ac168176c2bfc58f572eb716c4eadd65e4785c155dd8e
signature_date    : 2026-04-02T13:58:36.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         : Dau+mU2ANpyAJnYv9rlRIsmakswerIJTST+lHTHIpcnhv+FCxBeEM75MSAnUQHt+ULzn4BKkG83FyBavxHHb7BwnlroplOIr2WrUlyc8XtrdzUI6BVAENuQOrpmtwRBN/UGe3Rx1hKMmIP9G2OPC9fQpmMyTTg6Ni5iIN18+e1ICYF4giB/ffe+D/7Uw+Dhy7MwVsQ0EQLpBsSW9hqt8G5ER6+NWIrHhyalR9aJV4uybh0sUzgwr7yJEevzbuAO6jn1V+x6j0/KlAW2cCKzHYygOX3aiC5g7b76DpseFDD2BZaVn2Es0Iu6wbfPVGe0fnT8hqMXzvlKkF7xsuKq3zw==

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


app_name = "TeamViewer Portable"
zip_name = "TeamViewerPortable.zip"
app_dir = makepath(programfiles32, app_name)
app_path = makepath(app_dir, "TeamViewer.exe")
icon_path = app_path
audit_version_number = False
win64app = None


def get_installed_version(uninstallkey):
    for soft in installed_softwares(uninstallkey):
        return soft.get("version", None)
    return None


def install():
    # Declaring local variables
    package_version = control.get_software_version()
    installed_version = get_installed_version(app_name)
    ini_file = makepath(app_dir, "TeamViewer.ini")

    # Installing software
    if installed_version is None or Version(installed_version) < Version(package_version) or force:
        print("Installing: %s (%s)" % (app_name, control.get_software_version()))
        killalltasks(ensure_list(control.impacted_process))
        if isdir(app_dir) and force:
            remove_tree(app_dir)
        mkdirs(app_dir)
        print("Extracting: %s to: %s" % (zip_name, app_dir))
        unzipped_dir = zip_name.rsplit(".", 1)[0]
        # unzip(zip_name, app_dir)
        unzip(zip_name, unzipped_dir)
        copytree2(unzipped_dir, app_dir, shutil.ignore_patterns("TeamViewer.ini"), onreplace=default_overwrite)

        # Adding software to regitry
        print("Registering: %s to Windows Registry" % app_name)
        register_windows_uninstall(control, win64app=win64app)
        register_uninstall(app_name, win64app=win64app, install_location=app_dir, icon=icon_path)
    else:
        print("%s is already installed and up-to-date (%s)" % (app_name, control.get_software_version()))

    # Modifying ini file
    inifile_writestring(ini_file, "Settings", "nosave", "1")  # Avoid UAC
    inifile_writestring(ini_file, "Settings", "TermsOfUseAccepted", "1")  # Accept EULA and CLUF
    inifile_writestring(ini_file, "Settings", "UseNewUI", "0")  # Keep the old UI

    # Creating custom shortcuts
    create_desktop_shortcut(app_name, app_path)
    create_programs_menu_shortcut(app_name, app_path)

    # Adding Firewall Rules
    remove_netfirewallrule(app_name)
    add_netfirewallrule(app_name, app_path, app_name, profile="Domain,Private", protocol="UDP")
    add_netfirewallrule(app_name, app_path, app_name, profile="Domain,Private", protocol="TCP")


def audit():
    # Declaring local variables
    package_version = control.get_software_version()
    installed_version = get_installed_version(app_name)

    # Auditing software
    if installed_version is None:
        print("%s is not installed" % app_name)
        return "ERROR"
    elif Version(installed_version) != Version(package_version) and audit_version_number:
        print("%s is installed in version (%s) instead of (%s)" % (app_name, installed_version, package_version))
        return "WARNING"
    else:
        print("%s (%s) is installed" % (app_name, installed_version))
        return "OK"


def uninstall():
    # Uninstalling software
    killalltasks(ensure_list(control.impacted_process))
    if isdir(app_dir):
        remove_tree(app_dir)
    unregister_uninstall(app_name, win64app=win64app)

    # Removing shortcuts
    remove_desktop_shortcut(app_name)
    remove_programs_menu_shortcut(app_name)

    # Removing Firewall Rules
    remove_netfirewallrule(app_name)


def add_netfirewallrule(
    rule_name,
    app_path,
    group=None,
    direction="Inbound",
    profile=None,
    enabled=True,
    action="Allow",
    protocol=None,
):
    """
    Add a Windows Firewall rule using New-NetFirewallRule cmdlet in PowerShell for Windows 10 and newer,
    or netsh advfirewall for older Windows versions.

    https://learn.microsoft.com/troubleshoot/windows-server/networking/netsh-advfirewall-firewall-control-firewall-behavior
    https://learn.microsoft.com/powershell/module/netsecurity/new-netfirewallrule

    Args:
        rule_name (str): Display name for the firewall rule.
        app_path (str): Path to the program for which the rule is being created.
        group (str, optional): Group name for the firewall rule (only works with PowerShell).
        direction (str): Direction of the rule (Inbound or Outbound). Default: Inbound.
        profile (str or list, optional): Profile(s) to which the rule should apply (e.g., "Domain,Private"). Default: Any.
        enabled (bool): Specify if the created rule's state is Enabled (True) or not (False). Default: True.
        action (str): Action for the rule (Allow or Block). Default: Allow.
        protocol (str, optional): Protocol by name or number (e.g., "TCP", "UDP", "ICMPv4", or "ICMPv6"). Default: Any.

    Returns:
        waptutils.RunOutput: The result of the command execution.

    .. versionadded:: 2.5

    """
    if not isinstance(profile, list):
        profile = ensure_list(profile)
    profile = ",".join(profile)

    message = f"Adding Firewall Rule: {rule_name}"
    if direction:
        message += f" ({direction})"
    if protocol:
        message += f" ({protocol})"
    if action:
        message += f" ({action})"
    print(message)
    if windows_version() < WindowsVersions.Windows10:
        direction = "out" if direction.lower() == "Outbound".lower() else "in"
        enabled = "no" if not enabled else "yes"
        cmd_command = f'netsh advfirewall firewall add rule name="{rule_name}" dir={direction} action={action} program="{app_path}" enable={enabled}'
        if profile:  # any and all are working
            cmd_command += f' profile="{profile}"'
        if protocol:
            cmd_command += f' protocol="{protocol}"'
        result = run_notfatal(cmd_command)
    else:
        pwsh_command = (
            f'New-NetFirewallRule -DisplayName "{rule_name}" -Direction {direction} -Action {action} -Program "{app_path}" -Enabled {str(enabled)}'
        )
        if group:
            pwsh_command += f' -Group "{group}"'
        if profile:
            pwsh_command += f' -Profile "{profile}"'
        if protocol:
            pwsh_command += f' -Protocol "{protocol}"'
        result = run_powershell(pwsh_command, output_format="text")

    return result


def remove_netfirewallrule(rule_name):
    """
    Remove Windows Firewall rule using New-NetFirewallRule cmdlet in PowerShell for Windows 10 and newer,
    or netsh advfirewall for older Windows versions.

    Args:
        rule_name (str): Display name of the firewall rule to remove.

    Returns:
        waptutils.RunOutput: The result of the command execution.

    .. versionadded:: 2.5

    """
    print(f"Removing Firewall Rule: {rule_name}")
    if windows_version() < WindowsVersions.Windows10:
        result = run_notfatal(f'netsh advfirewall firewall delete rule name="{rule_name}"')
    else:
        result = run_powershell(
            f'Remove-NetFirewallRule -DisplayName "{rule_name}" -ErrorAction SilentlyContinue', output_format="text", accept_returncodes=[0, 1, 3010]
        )

    return result

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


def update_package():
    # Declaring local variables
    package_updated = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    url = "https://www.teamviewer.com/en/download/windows/"
    download_dict = {
        "windows-all": "https://download.teamviewer.com/download/TeamViewerPortable.zip",
    }
    download_url = download_dict[control.target_os + "-" + ensure_list(control.architecture)[0]]
    latest_bin = download_url.split("/")[-1]

    # Deleting binaries
    remove_outdated_binaries("*", "zip")

    # Downloading latest binaries
    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)

    version = ".".join(get_version_from_binary(unzip(latest_bin, ".", "tv_x64.exe")[0]).split(".")[:3])
    remove_file("tv_x64.exe")

    # # 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("INFO: Binary file version corresponds to online version")
    #     else:
    #         error("ERROR: Binary file version do NOT corresponds to online 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 update-package-sources
    return package_updated

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

ce0590992e1f1dc4113cfa89bc5c62f6f36f993bd62ceb1708e414c918bdc56c : TeamViewerPortable.zip
01ca7fe94636e5a08fcb73849d3b5df25d51e2c82f4dd1a08f01798b25899819 : WAPT/certificate.crt
db2f244cd42950b231f8842eacf5ed35551b4dfe67449c62b64ef734650ebad0 : WAPT/control
71d3c188b8ebd8672d0ffcb36dae22598986ef3bf83981d468779f234a617c94 : WAPT/icon.png
0d2ae2ca0d6d0ffd6a0d5b132b6e486defad22d8ec941909df57300f9e1d80f3 : luti.json
47768400b563265179c687f7922ad996901c3a568270dd2d3a7cfe6f46699508 : setup.py
abaee5727c3009484a9b43e3d9f6466a6cb1721b3aa4384910a461579e48e385 : update_package.py