Microsoft Office Template
Paquet d’installation silencieuse pour Microsoft Office Template
Configuration procedure:
- Télécharger le paquet "tis-microsoft-office-template".
- Dépôt privé > tis-microsoft-office-template > right-click > lancer l'update_package.
- Cliquez sur OK sur le message indiquant que la fonction update-package() a été lancée.
- Une fois la fenêtre affichée, cochez « uploader directement », sélectionnez une maturité de paquet, notez le préfixe de votre paquet et cochez « incrémenter la version du paquet ».
- Cliquez sur « Exécuter la mise à jour des paquets sélectionnés »..
Several questions will appear to guide you:
Please download Office Deployement Tool by clicking the download button Votre navigateur ouvrira la page de téléchargement de l'outil de déploiement d'Office.
Click OK when the download is complete* Si vous avez téléchargé avec succès l'outil de déploiement d'Office, confirmez en cliquant sur « OK ». Nous ouvrons votre explorateur de fichiers et vous suggérons de rechercher l'outil de déploiement d'Office fraîchement téléchargé, de le sélectionner et de cliquer sur « Ouvrir ».
Please complete your deployment settings with the online Office Customization Tool and download it by clicking Export. Note that you can go back anytime on the online tool to edit your configuration (by clicking Import) Nous ouvrons un navigateur qui pointe vers l'outil de personnalisation d'Office, et vous êtes libre de personnaliser votre fichier configuration.xml comme vous le souhaitez. Une fois votre configuration terminée, vous pouvez exporter le fichier configuration.xml.
Click OK when the XML is completed and downloaded Si l'exportation a réussi, vous pouvez cliquer sur « OK ». Nous ouvrons votre explorateur de fichiers et vous proposons de trouver le fichier configuration.xml fraîchement téléchargé, de le sélectionner et de cliquer sur « Ouvrir ».
Attendez quelques instants que le serveur WAPT télécharge la configuration XML. Ne manipulez pas la console pendant cette période (5-10 minutes).
You may wanna change local to:xx Si vous avez défini une langue dans votre fichier configuration.xml, il est préférable de transférer cette langue dans le fichier de contrôle de votre paquet. Exemple : fr.
You can redefine the name for the self-service Si vous souhaitez un nom différent, vous pouvez définir un nom de paquet pour l'interface libre-service. Exemple : Microsoft Office Fr 2019.
You can redefine the package name Si vous souhaitez un autre nom, vous pouvez définir un nom de paquet. Exemple : tis-microsoft-office-fr-2019.
Please fill the description (facultatif) A compléter à votre convenance.
Attendez quelques instants que le serveur crée le paquet complet (10-20 minutes).
Une fois le serveur terminé, cliquez sur « Uploader les paquets selectionnés ».
Une fois que le message « Up to Date » apparaît, le paquet a été généré et vous pouvez fermer la fenêtre « CLOSE ».
Votre paquet est maintenant disponible dans votre dépôt privé.
- package: tis-microsoft-office-template
- name: Microsoft Office Template
- version: 0-15
- categories: Office
- maintainer: WAPT Team,Tranquil IT,Jimmy PELÉ,Pierre COSSON
- editor: Microsoft
- licence: wapt_public
- locale: all
- target_os: windows
- impacted_process: EXCEL,GROOVE,MSACCESS,MSPUB,ONENOTE,OUTLOOK,POWERPNT,WINWORD
- architecture: all
- signature_date:
- size: 14.23 Ko
- installed_size: 2.36 Go
- homepage : https://www.office.com/
- conflicts :
package : tis-microsoft-office-template
version : 0-15
architecture : all
section : base
priority : optional
name : Microsoft Office Template
categories : Office
maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ,Pierre COSSON
description : To package the Microsoft Office version of your choice, run update_package
depends :
conflicts : tis-microsoft-access-2016-runtime,tis-microsoft-office-2016,tis-microsoft-office-2013
maturity : PROD
locale : all
target_os : windows
min_wapt_version : 2.3
sources : https://www.microsoft.com/download/details.aspx?id=49117
installed_size : 2362231960
impacted_process : EXCEL,GROOVE,MSACCESS,MSPUB,ONENOTE,OUTLOOK,POWERPNT,WINWORD
description_fr : Pour packager la version de Microsoft Office de votre choix, exécutez l'update_package
description_pl : Aby spakować wybraną wersję pakietu Microsoft Office, uruchom update_package
description_de : Um die Microsoft Office-Version Ihrer Wahl zu verpacken, führen Sie update_package
description_es : Para empaquetar la versión de Microsoft Office de su elección, ejecute update_package
description_pt : Para empacotar a versão do Microsoft Office da sua escolha, execute update_package
description_it : Per pacchettizzare la versione di Microsoft Office scelta, eseguire update_package
description_nl : Voer update_package uit om de Microsoft Office-versie van uw keuze te verpakken
description_ru : Чтобы упаковать выбранную вами версию Microsoft Office, запустите update_package
audit_schedule :
editor : Microsoft
keywords : office
licence : wapt_public
homepage : https://www.office.com/
package_uuid : 7dbdceac-244f-4941-b0ef-843ab5628b6b
valid_from :
valid_until :
forced_install_on :
changelog :
min_os_version : 10.0
max_os_version :
icon_sha256sum : 2ac98141bf5b6777083f2bcbeab3ab034c01dff77718e108774575aaaa54a144
signer : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date : 2025-11-15T19:09:10.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 : jw5sSWZBO7DTUrmbeUWSL2X0Qr8dguccM/9KuRhHHQ/hlJN6sFmI1+69IWfei4ve8ALB9O4SoINOkSEIZXIXrLW/0uSWPGzvCRkSy4EO7HAsJpOmE/ffrxFuR3+GNtgWhjs9jf4bwkljvobg38hA8qRk/2eXJ5OK3wDN1RTsfQthDeAJGHH8ZScHsjKqTNqN3lUdA+91mYXYXuONq8coxXvR0+CxKAIPdHqNLJW7A1v95ZAqHOUcOQMmW3q+UJpRc0DL96A8eBcwh7lNFlaU2dhsnYpW6Ms7txFTaCfdeaRQ3aXJ+4AFMQBD25zYHuyY38KFTyqjQLbuYEbMPHEipw==
# -*- coding: utf-8 -*-
from setuphelpers import *
import tempfile
"""
Ressources:
https://config.office.com/deploymentsettings
https://admx.help/?Category=Office2016&Policy=office16.Office.Microsoft.Policies.Windows::L_SCLCacheOverride
https://admx.help/?Category=Office2016&Policy=excel16.Office.Microsoft.Policies.Windows::L_SaveExcelfilesas
<Product ID=""> list:
https://www.microsoft.com/microsoft-365/enterprise/microsoft-365-apps-for-enterprise-product
Microsoft 365 Apps for enterprise
O365ProPlusRetail
O365ProPlusEEANoTeamsRetail
https://www.microsoft.com/microsoft-365/business/microsoft-365-apps-for-business
Microsoft 365 Apps for business
O365BusinessRetail
O365BusinessEEANoTeamsRetail
"""
app_uninstallkey = "O365BusinessEEANoTeamsRetail - fr-fr"
def install():
# Getting Product ID and Language ID from configuration.xml parsing file
with open("configuration.xml", "r", encoding="utf8") as f:
for line in f:
if "OfficeClientEdition" in line:
architecture = line.split('"')[1]
print("OfficeClientEdition: %s" % architecture)
if architecture == "64":
architecture = "x64"
else:
architecture = "all"
if "Product ID" in line:
product_id = line.split('"')[1]
print("Product ID: %s" % product_id)
if "Language ID" in line:
language_id = line.split('"')[1]
print("Language ID: %s" % language_id)
break
app_uninstallkey = f"{product_id} - {language_id}"
# Declaring local variables
package_version = control.get_software_version()
silentflags = "/configure configuration.xml"
# uninstalling older versions of office if needed
# uninstall_mso2013_if_needed("Office15.STANDARD")
# uninstall_mso2016_if_needed("Office16.STANDARD")
# uninstall_other_office_edition(app_uninstallkey.split(" ")[0])
# Installing the software
install_exe_if_needed(
"setup.exe",
silentflags=silentflags,
timeout=1200,
accept_returncodes=[1641, 3010, 0],
key=app_uninstallkey,
min_version=package_version,
)
# TODO "setup.exe /customize configuration.xml if up-to-date"
# Adding silent uninstall command
quiet_uninstall = installed_softwares(uninstallkey=app_uninstallkey)[0]["uninstall_string"] + " DisplayLevel=False"
if "OfficeClickToRun.exe" in quiet_uninstall:
register_uninstall(
uninstallkey=app_uninstallkey,
quiet_uninstall_string=quiet_uninstall,
)
def session_setup():
print("Disabling: MSO telemetry")
# https://admx.help/?Category=Office2016&Policy=office16.Office.Microsoft.Policies.Windows::L_OfficeOSMPreventedHostApplications
registry_set(HKEY_CURRENT_USER, r"software\policies\microsoft\office\16.0\osm\preventedapplications", "wdsolution", 1)
registry_set(HKEY_CURRENT_USER, r"software\policies\microsoft\office\16.0\osm\preventedapplications", "xlsolution", 1)
registry_set(HKEY_CURRENT_USER, r"software\policies\microsoft\office\16.0\osm\preventedapplications", "pptsolution", 1)
registry_set(HKEY_CURRENT_USER, r"software\policies\microsoft\office\16.0\osm\preventedapplications", "olksolution", 1)
registry_set(HKEY_CURRENT_USER, r"software\policies\microsoft\office\16.0\osm\preventedapplications", "accesssolution", 1)
registry_set(HKEY_CURRENT_USER, r"software\policies\microsoft\office\16.0\osm\preventedapplications", "projectsolution", 1)
registry_set(HKEY_CURRENT_USER, r"software\policies\microsoft\office\16.0\osm\preventedapplications", "publishersolution", 1)
registry_set(HKEY_CURRENT_USER, r"software\policies\microsoft\office\16.0\osm\preventedapplications", "visiosolution", 1)
registry_set(HKEY_CURRENT_USER, r"software\policies\microsoft\office\16.0\osm\preventedapplications", "onenotesolution", 1)
# https://admx.help/?Category=Office2016&Policy=office16.Office.Microsoft.Policies.Windows::L_OfficeOSMPreventedSolutionTypes
registry_set(HKEY_CURRENT_USER, r"software\policies\microsoft\office\16.0\osm\preventedsolutiontypes", "documentfiles", 1)
registry_set(HKEY_CURRENT_USER, r"software\policies\microsoft\office\16.0\osm\preventedsolutiontypes", "templatefiles", 1)
registry_set(HKEY_CURRENT_USER, r"software\policies\microsoft\office\16.0\osm\preventedsolutiontypes", "comaddins", 1)
registry_set(HKEY_CURRENT_USER, r"software\policies\microsoft\office\16.0\osm\preventedsolutiontypes", "appaddins", 1)
registry_set(HKEY_CURRENT_USER, r"software\policies\microsoft\office\16.0\osm\preventedsolutiontypes", "agave", 1)
# https://admx.help/?Category=Office2016&Policy=office16.Office.Microsoft.Policies.Windows::L_EnableLogging
# registry_set(HKEY_CURRENT_USER, r"software\policies\microsoft\office\16.0\osm", "enablelogging", 0)
registry_set(HKEY_CURRENT_USER, r"software\policies\microsoft\office\16.0\osm", "enableupload", 0)
registry_set(HKEY_CURRENT_USER, r"software\policies\microsoft\office\16.0\osm", "enablefileobfuscation", 1)
# # https://admx.help/?Category=Office2016&Policy=office16.Office.Microsoft.Policies.Windows::L_Onlinecontentoptions
# registry_set(HKEY_CURRENT_USER, r"software\policies\microsoft\office\16.0\common\internet", "useonlinecontent", 0)
# # https://admx.help/?Category=Office2016&Policy=office16.Office.Microsoft.Policies.Windows::L_ServiceLevelOptions
# registry_set(HKEY_CURRENT_USER, r"software\policies\microsoft\office\16.0\common\internet", "serviceleveloptions", 0)
def uninstall_other_office_edition(edition_uninstallkey):
# Initializing variables
silent_uninstall_file_path = makepath(tempfile.gettempdir(), "remove_other_office.xml")
uninstall_configuration_xml_content = r"""<Configuration>
<Remove All="TRUE">
</Remove>
<Display Level="none" CompletionNotice="No" SuppressModal="Yes" AcceptEula="Yes" />
<Setting Id="SETUP_REBOOT" Value="Never" />
<Setting Id="REBOOT" Value="ReallySuppress"/>
</Configuration>
"""
# Modify XML
with open(silent_uninstall_file_path, "w") as xml_file:
xml_file.write(uninstall_configuration_xml_content)
killalltasks(control.get_impacted_process_list())
# Uninstalling Office if needed
for to_uninstall in installed_softwares():
if ("OfficeClickToRun.exe" in to_uninstall["uninstall_string"]) and not (edition_uninstallkey in to_uninstall["key"]):
print("Removing: %s (%s)" % (to_uninstall["name"], to_uninstall["version"]))
app_uninstall_cmd = to_uninstall["uninstall_string"] + " DisplayLevel=False"
run(app_uninstall_cmd)
wait_uninstallkey_absent(to_uninstall["key"])
def uninstall_mso2016_if_needed(uninstallkey):
# Initializing variables
silent_uninstall_file_path = makepath(tempfile.gettempdir(), "remove_o2016.xml")
uninstall_configuration_xml_content = r"""<Configuration>
<Remove All="TRUE">
</Remove>
<Display Level="none" CompletionNotice="No" SuppressModal="Yes" AcceptEula="Yes" />
<Setting Id="SETUP_REBOOT" Value="Never" />
<Setting Id="REBOOT" Value="ReallySuppress"/>
</Configuration>
"""
# Modify XML
with open(silent_uninstall_file_path, "w") as xml_file:
xml_file.write(uninstall_configuration_xml_content)
# Uninstalling Office if needed
for to_uninstall in installed_softwares(uninstallkey=uninstallkey):
print("Removing: %s (%s)" % (to_uninstall["name"], to_uninstall["version"]))
killalltasks(control.get_impacted_process_list())
if "OfficeClickToRun.exe" in to_uninstall["uninstall_string"]:
app_uninstall_cmd = to_uninstall["uninstall_string"] + " DisplayLevel=False"
run(app_uninstall_cmd)
wait_uninstallkey_absent(to_uninstall["key"])
else:
run(to_uninstall["uninstall_string"] + ' /config "%s"' % silent_uninstall_file_path)
wait_uninstallkey_absent(to_uninstall["key"])
def uninstall_mso2013_if_needed(uninstallkey):
# Initializing variables
silent_uninstall_file_path = makepath(tempfile.gettempdir(), "remove_o2013.xml")
uninstall_configuration_xml_content = r"""<Configuration>
<Remove All="TRUE">
</Remove>
<Display Level="none" CompletionNotice="No" SuppressModal="Yes" AcceptEula="Yes" />
<Setting Id="SETUP_REBOOT" Value="Never" />
<Setting Id="REBOOT" Value="ReallySuppress"/>
</Configuration>
"""
# Modify XML
with open(silent_uninstall_file_path, "w") as xml_file:
xml_file.write(uninstall_configuration_xml_content)
# Uninstalling Office if needed
for to_uninstall in installed_softwares(uninstallkey=uninstallkey):
print("Removing: %s (%s)" % (to_uninstall["name"], to_uninstall["version"]))
killalltasks(control.get_impacted_process_list())
run(to_uninstall["uninstall_string"] + ' /config "%s"' % silent_uninstall_file_path)
wait_uninstallkey_absent(to_uninstall["key"])
# -*- coding: utf-8 -*-
from setuphelpers import *
from setupdevhelpers import *
import os
import sys
import webbrowser
def update_package():
# Declaring local variables
package_updated = False
proxies = get_proxies()
if not proxies:
proxies = get_proxies_from_wapt_console()
extract_path = "extract"
# if not the first run it will use the last setup downloaded if you want to get an updated one you can remove setup.exe and relaunch the update package
if not isfile("setup.exe") and not params.get("running_as_luti"):
ask_message(
"You browser will open",
"Please download Office Deployment Tool by clicking the download button",
raise_error=True,
)
webbrowser.open("https://www.microsoft.com/download/details.aspx?id=49117")
ask_message("Waiting for download", "Click OK when the download is complete", 1, raise_error=True)
# Copy to pkg
latest_bin = ask_filename(
"Please provide downloaded Office Deployment Tool to copy in this package",
makepath(user_home_directory, "Downloads"),
"",
"EXE Files|*.exe",
raise_error=True,
)
# Extract Office Deployment Tool
print("Copying: " + latest_bin)
run(rf'"{latest_bin}" /extract:"{extract_path}" /quiet"')
print("Extract Office Deployment Tool")
filecopyto(".\\extract\\setup.exe", basedir)
remove_file(latest_bin)
if isdir("extract"):
remove_tree("extract")
elif params.get("running_as_luti"):
download_url = "https://download.microsoft.com/download/2/7/A/27AF1BE6-DD20-4CB4-B154-EBAB8A7D4A7E/officedeploymenttool_17126-20132.exe"
latest_bin = download_url.split("/")[-1]
wget(download_url, latest_bin, proxies=proxies)
# Extract Office Deployment Tool
print("Copying: " + latest_bin)
run(rf'"{latest_bin}" /extract:"{extract_path}" /quiet"')
print("Extract Office Deployment Tool")
filecopyto(".\\extract\\setup.exe", basedir)
remove_file(latest_bin)
if isdir("extract"):
remove_tree("extract")
# if not the first run it will use the last XML used if you want to get a new one you can remove configuration.xml and relaunch the update package
if not isfile("configuration.xml"):
ask_message(
"Your browser will open",
"Please complete your deployment settings with the online Office Customization Tool and download it by clicking Export.\nNote that you can go back anytime on the online tool to edit your configuration (by clicking Import)",
raise_error=True,
)
webbrowser.open("https://config.office.com/deploymentsettings")
ask_message("Waiting for download", "Click OK when the XML is completed and downloaded", 1, raise_error=True)
xml_configuration = ask_filename(
"Please select your XML configuration file",
basedir,
"configuration.xml",
"XML Files|*.xml",
raise_error=True,
) # makepath(user_home_directory, "Downloads")
if not isfile("configuration.xml"):
filecopyto(
xml_configuration,
basedir + "\\configuration.xml",
)
# Asking to remove the last downloaded sources
if isdir("Office"):
if not params.get("running_as_luti"):
response = ask_message(control.package, "Do you want to remove the last downloaded sources?", 35, raise_error=True)
if response == 6:
print("Removing last sources folder downloaded")
remove_tree("Office")
else:
print("Removing last sources folder downloaded")
remove_tree("Office")
else:
# Download Office with XML configuration
print("Downloading Office with XML configuration")
if windows_version() >= WindowsVersions.Windows10:
run("setup.exe /download configuration.xml", timeout=2400) # DisplayLevel=Full # not working
else:
error("MSO setup.exe can no longer be run on this OS")
# Getting version from source dir
version = glob.glob("Office/Data/**/")[0].split(os.sep)[1]
# Changing version of the package
if Version(version, 4) > Version(control.get_software_version(), 4):
print("Software version updated (from: %s to: %s)" % (control.get_software_version(), Version(version)))
package_updated = True
else:
print("Software version up-to-date (%s)" % Version(version))
control.set_software_version(version)
control.save_control_to_wapt()
# Getting Product ID and Language ID from configuration.xml parsing file
with open("configuration.xml", "r", encoding="utf8") as f:
for line in f:
if "OfficeClientEdition" in line:
architecture = line.split('"')[1]
print("OfficeClientEdition: %s" % architecture)
if architecture == "64":
architecture = "x64"
else:
architecture = "all"
if "Product ID" in line:
product_id = line.split('"')[1]
print("Product ID: %s" % product_id)
if "Language ID" in line:
language_id = line.split('"')[1]
print("Language ID: %s" % language_id)
break
if control.architecture != architecture:
control.architecture = architecture
control.save_control_to_wapt()
# Asking pkg infos if needed
if control.locale not in language_id and "-template" in control.package:
control.locale = ask_input(control.package, "You may wanna change locale to: %s" % language_id.split("-")[0], "all", raise_error=False)
print("Changing locale to: %s in WAPT\\control" % control.locale)
control.save_control_to_wapt()
if not params.get("running_as_luti"):
complete_control_name(control, control.name, params.get("running_as_luti"))
complete_control_package(control, control.package, params.get("running_as_luti"), False)
# Validating or not update-package-sources
return package_updated
730b508f2e8f5a37567d845c4b0bc8d0f8ffbf6c23b1b7278eff7a65541a768c : WAPT/README.md
04be3593cb4b99174a4cb0b14333457fa2ed54188a9937051a7bc74f1e29e53d : WAPT/README_fr.md
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
68bd25a74f96ffff29c443554c8115d2b6f10bdf7cd57cdba1af29d28d7313b5 : WAPT/changelog.txt
07b94a1a71d2468875ae3e352820367c2ce7261e00a6d76234be127f245a2aec : WAPT/control
2ac98141bf5b6777083f2bcbeab3ab034c01dff77718e108774575aaaa54a144 : WAPT/icon.png
187b930f9fff5857dbe547a2fec12169e24e49d6540ac99e377b1508577449cc : configuration-example.xml
babe2e28c6d032046aa70801687cc57739fcf14a35839907f5cbd0cc0b5d2595 : luti.json
c2c0b5d752d1cc4cf73a12002ef4798ced3fa8b529ca118a0f8e905d5321b577 : setup.py
64ffb526d90fbb1f95e676a999c637cd369a415573b3032e773313f762473295 : update_package.py
0-14
===
Disable (commented) the uninstall functions:
- uninstall_mso2013_if_needed("Office15.STANDARD")
- uninstall_mso2016_if_needed("Office16.STANDARD")
- uninstall_other_office_edition()
Raise error in update_package if user exit popups
0-12
===
Added another uninstall function for all other office versions
0-11
===
increase timeout for download (40 minutes)
template is no longer proprietary_restricted
0-10
===
The function uninstall_mso2013_if_needed() and uninstall_mso2016_if_needed() may have failed to execute properly
fix ask_*() functions
min_os_version : 10.0
improve functions
silent if params.get("running_as_luti")
now ask user if he want to remove the last downloaded sources
force encoding