- package: tis-element
- name: Element
- version: 1.12.0-1
- categories: Utilities
- maintainer: WAPT Team,Tranquil IT,Ingrid TALBOT
- locale: all
- target_os: windows
- impacted_process: Element
- architecture: x64
- signature_date:
- size: 174.05 Mo
- installed_size: 674.87 Mo
package : tis-element
version : 1.12.0-1
architecture : x64
section : base
priority : optional
name : Element
categories : Utilities
maintainer : WAPT Team,Tranquil IT,Ingrid TALBOT
description : Element is a free and open-source software instant messaging client implementing the Matrix protocol
depends :
conflicts :
maturity : PROD
locale : all
target_os : windows
min_wapt_version : 2.3
sources :
installed_size : 674868071
impacted_process : Element
description_fr :
description_pl :
description_de :
description_es :
description_pt :
description_it :
description_nl :
description_ru :
audit_schedule :
editor :
keywords : messaging
licence :
homepage :
package_uuid : 9143ba87-f9d4-47ea-a059-e20e15548624
valid_from :
valid_until :
forced_install_on :
changelog :
min_os_version :
max_os_version :
icon_sha256sum : 97bc7b132a900ec71b17a423ad8c979dac0134bdde3a89726d263874c7fd2f3e
signer : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date : 2025-09-28T13:04:05.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 : T9yrxMuHnWm2TZMeT+YxSSms/EZvL+9ZJiQ8keeLcSPJMLAG2Ard15qhAxJuqlWR8zgRrcmfTZ2h9CLNWsl5/mZJh7kUVt3ElbOqvkIlorJDh1PFF6lbzJPtdeqjz7cdCbgQmbxoGHfVX9EwZh8V+rSKOsKytp6tBiBn3MzrVy9BhcPzo+usQcig+YpEwDbrvFbSayZ226RZunc8aAPMjD6owX2huJVgTM0gGcTfZxeAvmfFjn+6SCRO9cMEwZ3wvYO2Hf45dpII1YlgmV1YfFszpNq92pACWJQeO4Ew/N8wB/N6KCnjkoGIV/fnm/pI29EnhGO4relpdgilizK8Cw==
# -*- coding: utf-8 -*-
from setuphelpers import *
import time
element_install_dir = makepath(programfiles32, "element_install")
element_install_path = makepath(element_install_dir, "ElementSetup.exe")
def install():
mkdirs(element_install_dir)
filecopyto("ElementSetup.exe", element_install_path)
element_squirrel_remove()
def session_setup():
programdata_user_dir = makepath(programdata, get_current_user)
programdata_app_dir = makepath(programdata_user_dir, "Element")
if isdir(programdata_app_dir):
if not isfile(makepath(programdata_app_dir, ".dead")):
try:
app_uninstall_cmd = rf'"{programdata_app_dir}\Update.exe" --uninstall -s'
run(app_uninstall_cmd)
except:
print("Unable to remove Element in: %s" % programdata_app_dir)
remove_tree(programdata_app_dir)
if dir_is_empty(programdata_user_dir):
remove_tree(programdata_user_dir)
# Install app
user_app_dir = makepath(user_local_appdata, "Element")
element_versions = glob.glob(makepath(user_app_dir, "**/ElementSetup.exe"))
if element_versions:
element_version = "1.0"
for d in element_versions:
if Version(get_file_properties(d)["ProductVersion"]) > Version(element_version):
element_version = get_file_properties(d)["ProductVersion"]
if Version(control.get_software_version()) > Version(element_version):
run('"%s"' % element_install_path)
else:
print("Element already up-to-date (%s)" % element_version)
else:
run('"%s"' % element_install_path + " --silent")
# Element interact differently if user is admin
if running_as_admin():
element_squirrel_remove()
def uninstall():
if isdir(element_install_dir):
remove_tree(element_install_dir)
element_squirrel_remove()
# if element was uninstalled a .dead file is left behind to prevent automatic reinstall
for user_dir in glob.glob(makepath(systemdrive, "Users", "*")):
# "C:\Users\username\AppData\Local\element-desktop\Update.exe"
local_appdata_app_dir = makepath(user_dir, "AppData", "Local", "element-desktop")
if isdir(local_appdata_app_dir):
if not isfile(makepath(local_appdata_app_dir, ".dead")):
try:
app_uninstall_cmd = rf'"{local_appdata_app_dir}\Update.exe" --uninstall -s'
print(app_uninstall_cmd)
run(app_uninstall_cmd)
except:
print("Unable to remove Element for user: %s" % user_dir.split(os.sep)[-1])
remove_tree(local_appdata_app_dir)
# "C:\Users\jpadmin\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Element Inc"
start_shortcut = makepath(user_dir, r"AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Element")
desktop_shortcut = makepath(user_dir, r"Desktop\Element.lnk")
if isfile(desktop_shortcut):
remove_file(desktop_shortcut)
if isdir(start_shortcut):
remove_tree(start_shortcut)
def element_squirrel_remove():
squirrel_dir = makepath(programdata, "SquirrelMachineInstalls")
element_old_installer = makepath(programdata, "Element.exe")
if isfile(element_old_installer):
remove_file(element_old_installer)
if dir_is_empty(squirrel_dir):
remove_tree(squirrel_dir)
from setuphelpers import *
import waptlicences
def update_package():
# Declaring local variables
package_updated = False
proxies = get_proxies()
if not proxies:
proxies = get_proxies_from_wapt_console()
update_dict = {"windows": ".exe"}
download_url = "https://packages.element.io/desktop/install/win32/x64/Element%20Setup.exe"
latest_bin = download_url.rsplit("/")[-1].replace("%20","")
version_url = "https://api.github.com/repos/element-hq/element-web/releases/latest"
# Getting latest version information from official sources
json_load = wgets(version_url, proxies=proxies, as_json=True)
version = json_load["tag_name"].replace("v", "").replace(".windows", "")
# Downloading latest binaries
print(f"Latest version of {control.name} is: {version}")
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)
# Check signature bin
expected_issuer = 'NEW VECTOR LTD'
sign_name = waptlicences.check_exe_signing_certificate(latest_bin)[0]
if sign_name != expected_issuer:
error('Bad issuer %s != %s ' % (sign_name,expected_issuer))
# Changing version of the package
if Version(version) > Version(control.get_software_version()):
print(f"Software version updated (from: {control.get_software_version()} to: {Version(version)})")
package_updated = True
else:
print(f"Software version up-to-date ({Version(version)})")
# Deleting binaries
for f in glob.glob("*.exe"):
if f != latest_bin:
remove_file(f)
control.set_software_version(version)
control.save_control_to_wapt()
return package_updated
a920fd0b253c119b0750a60f4f965ebf728d24529c6e2df0b4233ac63010f160 : ElementSetup.exe
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
caa532633f736082cfdc840c322b32423310ac0a72dc441c90334110c6744376 : WAPT/control
97bc7b132a900ec71b17a423ad8c979dac0134bdde3a89726d263874c7fd2f3e : WAPT/icon.png
1504edd53f286224345cc526acb55b56d5c8d40ca2e2304b56a19909610be417 : luti.json
0da3704f700b966254a0b9372407bf876386ca5cb29ea7474726c7d6bc6a445e : setup.py
33193804fc4455a9ec5a929946a08e1d0278dc452831ab9c7d917a0536319dbb : update_package.py