tis-vcredist2015-2019

14.28.29913.0-14
The Visual C++ Redistributable Packages install run-time components that are required to run C++ applications built using Visual Studio
3430 downloads
Download

  Description 

  • package : tis-vcredist2015-2019
  • version : 14.28.29913.0-14
  • architecture : all
  • categories : Development,System and network
  • maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ
  • description : The Visual C++ Redistributable Packages install run-time components that are required to run C++ applications built using Visual Studio
  • locale : all
  • target_os : windows
  • min_os_version : 6.1
  • max_os_version :
  • min_wapt_version : 1.7
  • sources : https://support.microsoft.com/help/2977003/the-latest-supported-visual-c-downloads
  • installed_size :
  • impacted_process :
  • description_fr : Les packages Redistribuable Visual C++ installent les composants d'exécution nécessaires pour exécuter les applications C++ créées à l'aide de Visual Studio
  • description_pl :
  • description_de :
  • description_es :
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor : Microsoft
  • licence : Freeware
  • signature_date : 2021-03-29T12:45:52.755687
  • Homepage : https://www.microsoft.com/

  Setup.py 

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

uninstallkey = []

# Defining variables
bin_name_x86 = 'VC_redist.x86.exe'
bin_name_x64 = 'VC_redist.x64.exe'
#bin_name_arm64 = 'VC_redist.arm64.exe'
silent_args = '/quiet /norestart'


url_dl_x86 = 'https://aka.ms/vs/16/release/VC_redist.x86.exe'
url_dl_x64 = 'https://aka.ms/vs/16/release/VC_redist.x64.exe'
#url_dl_arm64 = 'https://aka.ms/vs/16/release/VC_redist.arm64.exe'




def install():
    # Installing the package
    
    vers = control.version.split('-')[0]

    if check_if_install_need('x86',vers):
        print('Installing: %s' % bin_name_x86)
        run('"%s" %s' % (bin_name_x86,silent_args))
        if check_if_install_need('x86',vers):
            error('The installation did not go well')


    if iswin64():
        if check_if_install_need('x64',vers):
            print('Installing: %s' % bin_name_x64)
            run('"%s" %s' % (bin_name_x64,silent_args))
            if check_if_install_need('x64',vers):
                error('The installation did not go well')

def uninstall():
    vers = control.version.split('-')[0]

    ukey_x86 = installed_softwares('Microsoft Visual C++ 2015-2019 Redistributable (x86) - %s' % vers)
    if ukey_x86:
        run(uninstall_cmd(ukey_x86[0]['key']))

    if iswin64():
        ukey_x64 = installed_softwares('Microsoft Visual C++ 2015-2019 Redistributable (x64) - %s' % vers)
        if ukey_x64:
            run(uninstall_cmd(ukey_x64[0]['key']))

def audit():
    
    vers = control.version.split('-')[0]

    err = False
    if iswin64():
        if check_if_install_need('x64',vers):
            print('Microsoft Visual C++ 2015-2019 Redistributable (x64) with min version %s not found' % vers)
            err = True
    if check_if_install_need('x86',vers):
        print('Microsoft Visual C++ 2015-2019 Redistributable (x86) with min version %s not found' % vers)
        err = True
    
    if err:
        return 'ERROR'

    warn = False

    if iswin64():
        x64vers = installed_softwares('Microsoft Visual C++ 2015-2019 Redistributable (x64) -')[0]['version']
        if Version(x64vers) > Version(vers):
            print('The version installed on the workstation is more recent (x64) ! %s' % x64vers)
            warn = True

    x86vers = installed_softwares('Microsoft Visual C++ 2015-2019 Redistributable (x86) -')[0]['version']
    if Version(x86vers) > Version(vers):
        print('The version installed on the workstation is more recent (x86) ! %s ' % x86vers)
        warn = True

    if warn:
        return "WARNING"

    return "OK"
    


    

def check_if_install_need(arch,vers):
    for soft in installed_softwares('Microsoft Visual C++ 2015-2019 Redistributable (%s) - ' % arch ):
        if Version(soft['version']) >= Version(vers):
            return False
    return True

def update_package():
    # Initializing variables
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()

    # Downloading binaries
    print('Downloading ' + bin_name_x64)
    wget(url_dl_x64, bin_name_x64, proxies=proxies)
    print('Downloading ' + bin_name_x86)
    wget(url_dl_x86, bin_name_x86, proxies=proxies)

    # Changing version of the package
    version = get_version_from_binary(bin_name_x86)
    control.version = '%s-%s' % (version, int(control.version.split('-')[-1])+1)
    control.save_control_to_wapt()
    print('Changing package version to: %s in WAPT\\control' % control.version)




def get_proxies():
    if platform.python_version_tuple()[0] == '3':
        from urllib.request import getproxies
    else:
        from urllib import getproxies
    return getproxies()


def get_proxies_from_wapt_console():
    proxies = {}
    if platform.system() == 'Windows':
        waptconsole_ini_path = makepath(user_local_appdata(), 'waptconsole', 'waptconsole.ini')
    else:
        waptconsole_ini_path = makepath(user_home_directory(), '.config', 'waptconsole', 'waptconsole.ini')
    if isfile(waptconsole_ini_path):
        proxy_wapt = inifile_readstring(waptconsole_ini_path, 'global', 'http_proxy')
        if proxy_wapt:
            proxies = {'http': proxy_wapt, 'https': proxy_wapt}
    return proxies


def get_version_from_binary(filename, parameter='ProductVersion'):
    if filename.endswith('.msi'):
        return get_msi_properties(filename)[parameter]
    else:
        return get_file_properties(filename)[parameter]


										

  Changelog 


No changelog
  manifest.sha256 
[["setup.py","b93b0fa3635fefc848b386c087277e517dd7ca6e5c11e86f84c8908d22bd939e"],["VC_redist.x64.exe","015edd4e5d36e053b23a01adb77a2b12444d3fb6eccefe23e3a8cd6388616a16"],["VC_redist.x86.exe","e830c313aa99656748f9d2ed582c28101eaaf75f5377e3fb104c761bf3f808b2"],["WAPT/certificate.crt","a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf"],["WAPT/icon.png","057c35554d9d1cc9cc72c539d46ad6f712893330a3ce22ff7676e84fcbb34fba"],["WAPT/control","6b2910e87612f802d8bfc2b516c9cf28892e6cde2590326196407a4395d2da26"]]