Element
Silent install package for Element
1.12.9-1
Utilities
Utilities
Preprod packages are packages built on LUTI.
They remain in PREPROD usually for 5 days, after which a second VirusTotal scan is performed to verify that the status has not changed.
If the package passes this last check, it is promoted to PROD and published on the store.
- package: tis-element
- name: Element
- version: 1.12.9-1
- categories: Utilities
- maintainer: WAPT Team,Tranquil IT,Ingrid TALBOT
- locale: all
- target_os: windows
- impacted_process: Element
- architecture: x64
- signature_date:
- size: 187.06 Mo
- installed_size: 674.87 Mo
package : tis-element
version : 1.12.9-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 : PREPROD
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 : e6bfbc78-c95b-4206-aa42-dab9a362bebe
valid_from :
valid_until :
forced_install_on :
changelog :
min_os_version :
max_os_version :
icon_sha256sum : 97bc7b132a900ec71b17a423ad8c979dac0134bdde3a89726d263874c7fd2f3e
signer : test
signer_fingerprint: b82fc8ef4a4475c0f69ac168176c2bfc58f572eb716c4eadd65e4785c155dd8e
signature_date : 2026-01-27T14:06:21.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 : YRLjt7eFsTB+xmNk3CQRobdDFFoPNCh7KVVnD/IdDnlAYVsktXwjVaA5csSddZYY3oIV/SyvU2O8U4Qm/nd6CM9tbdXGuuh2z5Z0hazLu7CJqKJMXRzyW4IkZUO1LX4sBDMD06926m4CU4HjJ5zgordGAtjWA6WfhII85qXNi/2VXVZm17CsjsOdOH1gL+aYSbbnAiy3l7kfjuh4z7kcRoH9rZw5erNH9y3cSmM82niuQRysT96lRmSqYEyZxB2W3sOO1ZTG35jT8zJ3D/WnwUD9jttZeDmV3FRo+0tihoEYdkvcz8elomvzzs9ShuD02R1GbPc2Y6B8/XGK54w9Iw==
# -*- 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
9d935a677ade85f8c67a6bd1523aaa9053463637326eb5d1ea59a4a2a134f26b : ElementSetup.exe
01ca7fe94636e5a08fcb73849d3b5df25d51e2c82f4dd1a08f01798b25899819 : WAPT/certificate.crt
ac84c4dd4682c1f5afc5a0fe66bad0828295650ef16036039e96472dcbe614a1 : WAPT/control
97bc7b132a900ec71b17a423ad8c979dac0134bdde3a89726d263874c7fd2f3e : WAPT/icon.png
27299b9f021e5e2b0b4f673dc53709281c93b9fc168fbec02ae752c38e106cc7 : luti.json
0da3704f700b966254a0b9372407bf876386ca5cb29ea7474726c7d6bc6a445e : setup.py
33193804fc4455a9ec5a929946a08e1d0278dc452831ab9c7d917a0536319dbb : update_package.py