# -*- coding: utf-8 -*-
from setuphelpers import *
    
app_uninstallkey = "{74CECDD9-4B8E-4AE3-9571-8070A17F3C34}"

def install():
    bin_name_string = glob.glob("Windows-Ezcast*.exe")[0]

    install_exe_if_needed(
        bin_name_string,
        silentflags="/S -var:Reboot=No",
        key=app_uninstallkey,
        min_version=control.get_software_version()
    )

    quiet_uninstall_string = installed_softwares(uninstallkey=app_uninstallkey)[0]["uninstall_string"] + " /S -var:Reboot=No"
    register_uninstall(app_uninstallkey, quiet_uninstall_string=quiet_uninstall_string)
