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


def install():
    bin_name = glob.glob("Bitwarden-Installer-*.exe")[0]
    install_exe_if_needed(
        bin_name,
        silentflags="/S /ALLUSERS",
        key="173a9bac-6f0d-50c4-8202-4744c69d091a",
        min_version=control.get_software_version(),
    )

    # Disabling updater (source: https://github.com/bitwarden/desktop/issues/697)
    set_environ_variable("ELECTRON_NO_UPDATER", "1")
