Forced reboot on install and uninstall - The EZCast Pro app for Windows is a powerful tool to cast your content from your PC to big screen, which supports Split Screen, Host Control, AirView and other new features.


  • package : tis-ezcast-pro
  • version :
  • architecture : all
  • categories : Media,Drivers
  • maintainer : WAPT Team, Tranquil IT, Jimmy PELÉ
  • description : Forced reboot on install and uninstall - The EZCast Pro app for Windows is a powerful tool to cast your content from your PC to big screen, which supports Split Screen, Host Control, AirView and other new features.
  • locale : all
  • target_os : windows
  • min_os_version : 6.1
  • max_os_version :
  • min_wapt_version : 1.5
  • sources : https://www.ezcast.com/app/ezcast/pro/windows
  • installed_size :
  • impacted_process : EZCastPro, extensionDisplaySetup64, extensionDisplaySetup32
  • description_fr : Redémarrage forcé à l'installation et à la désinstallation - EZCast Pro est l’outil collaboratif qui vous permet de projeter et partager du contenu sans fil, avec vos collègues ou vos élèves, depuis votre propre matériel (BYOD), que ce soit depuis votre PC/Mac ou encore votre tablette/smartphone (iOS, Android, Mac, Windows).
  • description_pl :
  • description_de :
  • description_es :
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor : Actions Microelectronics
  • licence : Freeware
  • signature_date : 2020-09-09T10:01:11.673979
  • Homepage : https://www.ezcast.com/


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

uninstallkey = []

# Defining variables
bin_name_string = 'EZCastPro_Win%s.exe'
silent_args = '/S /norestart'
app_uninstallkey = '{EAC16524-B32D-4264-BE6A-E37B51AA3978}'

def install():
    # Initializing variables
    package_version = control.version.split('-',1)[0]
    bin_name = bin_name_string % package_version

    # Installing the package
    print('Installing: %s' % bin_name)

    # Avoiding the usage by WAPT of the app built-in Uninstallstring

def uninstall():
    # Uninstalling the package
    run(r'"%s" %s' % (makepath(install_location(app_uninstallkey), 'Uninstall.exe'), silent_args))

def session_setup():
    print("Disabling: auto-update-check")
    #registry_set(HKEY_CURRENT_USER, r'SOFTWARE\OpenShell\OpenShell\Settings', 'Update', 0, type=REG_DWORD)

def update_package():
    print('Downloading/Updating package content from upstream binary sources')

    # Initializing variables
    proxies = get_proxies()
    app_name = control.name
    url = control.sources

    # Getting latest version from official website
    print('URL used is: ' + url)
    version = bs_find(url, 'a', 'href', 'javascript:void(0);', proxies=proxies)['onclick'].split('EZCastPro_Win')[-1].split('.exe')[0]
    latest_bin = bin_name_string % version
    url_dl = ('http://www.ezcast.com/upgrade/ezcastpro/%s' % latest_bin)

    print("Latest %s version is: %s" % (app_name, version))
    print("Download url is: %s" % url_dl)

    # Downloading latest binaries
    if not isfile(latest_bin):
        print('Downloading: %s' % latest_bin)
        wget(url_dl, latest_bin, proxies=proxies)

        # Checking version from file
        version_from_file = get_version_from_binary(latest_bin)
        if version != version_from_file:
            os.rename(latest_bin, bin_name_string % version_from_file)
            version = version_from_file

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

    # Deleting outdated binaries

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

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

def remove_outdated_binaries(version,list_filename_contain=('x64','x86','win32','win64','32','64'),list_extensions=('exe','msi','deb','rpm','dmg','pkg')):
    for file_ext in list_extensions:
        for bin_in_dir in glob.glob('*.%s' % file_ext):
            if not version in bin_in_dir:
                for filename_contain in list_filename_contain:
                    if not filename_contain in bin_in_dir:
                        print('Outdated binary: %s Removed' % bin_in_dir)

def bs_find(url, element, attribute=None, value=None, headers=None, proxies=None, features='html.parser', **kwargs):
    """"You may need to use a header for some websites. For example: headers={'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0'}
    import requests
    page = requests.get(url, proxies=proxies, headers=headers, **kwargs).text
        import bs4 as BeautifulSoup
        soup = BeautifulSoup.BeautifulSoup(page, features=features)
        import BeautifulSoup
        soup = BeautifulSoup.BeautifulSoup(page)
    if value:
        return soup.find(element,{attribute:value})
        return soup.find(element)



Changelog software url : https://www.ezcast.com/release

No changelog