Seite 1 von 1

configuration.xml-Problem bei tis-microsoft-office-365-enterprise

Veröffentlicht: 27. Februar 2024 - 10:51 Uhr
von Gerald
Hallo,

unsere Firma hat sich für WAPT zum Hochladen von Anwendungen entschieden. Daher habe ich diese Aufgabe 15 Tage vor dem Produktivstart und der WAPT-Installation des Microsoft Office-Pakets übernommen. Ich muss dazu sagen, dass ich mit WAPT nicht vertraut bin und bisher wenig Zeit hatte, mich einzuarbeiten.

Ich habe das Paket „tis-microsoft-office-365-enterprise“ aus dem Microsoft Store heruntergeladen. Die Installation verlief reibungslos, abgesehen von einem Prüffehler auf einigen Rechnern, was aber momentan kein großes Problem darstellt.

Mir ist jedoch ein Problem aufgefallen: Meine Antwortdatei „configuration.xml“ wird nicht erkannt. Habe ich etwas übersehen?
Die Datei befindet sich auf meinem Server im Stammverzeichnis, in der Nähe von „setup.exe“.

Falls jemand eine Idee hat
oder weitere Informationen benötigt, stelle ich diese gerne zur Verfügung.

Betreff: Problem mit configuration.xml tis-microsoft-office-365-entreprise

Veröffentlicht: 28. Februar 2024 – 16:58 Uhr
von dcardon
Hallo Gerald,
Gérald schrieb: 27. Feb. 2024 - 10:51 Die Datei ist auf meinem Server im Stammverzeichnis innerhalb von setup.exe gespeichert.
Meinen Sie mit „auf dem Server“ das WAPT-Paket? Sie müssen das Paket bearbeiten und die darin enthaltene Datei configuration.xml ersetzen.

Alternativ können Sie auch das Paket verwenden https://wapt.tranquil.it/store/en/tis-m...e-template welches ein update_package anbietet, das Sie durch den Paketvorbereitungsprozess führt.

Aufrichtig,

Denis

Betreff: Problem mit configuration.xml tis-microsoft-office-365-entreprise

Veröffentlicht: 29. Februar 2024 – 15:48 Uhr
von Gerald
Hallo,

da ich ein absoluter Anfänger bin, verstehe ich das Konzept eines Pakets noch nicht.

Ist es die .wapt-Datei oder das Verzeichnis (in dem die Installationsdateien gespeichert sind)?
Meine Konfigurationsdatei befindet sich im Verzeichnis c:\waptdev\microsoft-office-etc... .

Irgendetwas muss mir entgangen sein.

Betreff: Problem mit configuration.xml tis-microsoft-office-365-entreprise

Veröffentlicht: 29. Februar 2024 – 20:21 Uhr
von vcardon
Hallo Gerald,

dieser Abschnitt der Dokumentation hilft dir, das Konzept eines Pakets in WAPT zu verstehen.

https://www.wapt.fr/fr/doc-2.5/wapt-pac ... e-detailed

Betreff: Problem mit configuration.xml tis-microsoft-office-365-entreprise

Veröffentlicht: 1. März 2024 - 11:53 Uhr
von Gerald
Danke, ich hatte also Recht.

Das erklärt aber nicht, warum meine Antwortdatei nicht erkannt wird.
Die Paketstruktur ist korrekt. Meine Konfigurationsdatei befindet sich tatsächlich im Stammverzeichnis und auf derselben Ebene wie setup.exe.

Unten ist meine setup.py-Datei, die ich nicht verändert habe. Sie stammt aus dem Originalpaket.

Eine Zeile bereitet mir jedoch noch Sorgen:

# TODO "setup.exe /customize configuration.xml if up-to-date" Muss ich nach dem Einfügen meiner Datei noch etwas tun, z. B. das Paket neu erstellen oder packen?






Datei setup.py


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

"""
Resources:
https://config.office.com/deploymentsettings
https://admx.help/?Category=Office2016& ... heOverride
https://admx.help/?Category=Office2016& ... celfilesas

"""

app_uninstallkey = "O365ProPlusRetail - fr-fr"


def install():
# Deklarieren lokaler Variablen
package_version = control.get_software_version()
silentflags = "/configure configuration.xml"

# Deinstallieren älterer Office-Versionen bei Bedarf
uninstall_mso2013_if_needed("Office15.STANDARD")
uninstall_mso2016_if_needed("Office16.STANDARD")

# Deinstallieren anderer Office-Versionen bei Bedarf
uninstall_other_office_edition(app_uninstallkey.split(" ")[0])

# Installieren der 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"

# Hinzufügen des Befehls für die stille Deinstallation
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("Deaktivierung: MSO-Telemetrie")
# https://admx.help/?Category=Office2016& ... plications
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& ... utionTypes
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& ... bleLogging
# 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& ... entoptions
# registry_set(HKEY_CURRENT_USER, r"software\policies\microsoft\office\16.0\common\internet", "useonlinecontent", 0)
# # https://admx.help/?Category=Office2016& ... velOptions
# registry_set(HKEY_CURRENT_USER, r"software\policies\microsoft\office\16.0\common\internet", "serviceleveloptions", 0)


def uninstall_other_office_edition(edition_uninstallkey):
# Variablen initialisieren
silent_uninstall_file_path = makepath(tempfile.gettempdir(), "remove_other_office.xml")
uninstall_configuration_xml_content = r"""
<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>
"""
# XML
mit open(silent_uninstall_file_path, "w") as xml_file ändern:
xml_file.write(uninstall_configuration_xml_content)

killalltasks(control.get_impacted_process_list())
# Office deinstallieren, falls erforderlich
for to_uninstall in installed_softwares():
if ("OfficeClickToRun.exe" in to_uninstall["uninstall_string"]) and not (edition_uninstallkey in to_uninstall["key"]):
print("Entferne: %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):
# Initialisierung der Variablen
silent_uninstall_file_path = makepath(tempfile.gettempdir(), "remove_o2016.xml")
uninstall_configuration_xml_content = r"""
<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>
"""
# XML
mit open(silent_uninstall_file_path, "w") as xml_file modifizieren:
xml_file.write(uninstall_configuration_xml_content)

# Office deinstallieren, falls erforderlich
for to_uninstall in installed_softwares(uninstallkey=uninstallkey):
print("Entferne: %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):
# Variablen initialisieren
silent_uninstall_file_path = makepath(tempfile.gettempdir(), "remove_o2013.xml")
uninstall_configuration_xml_content = r"""
<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>
"""
# XML
mit open(silent_uninstall_file_path, "w") as xml_file modifizieren:
xml_file.write(uninstall_configuration_xml_content)

# Office deinstallieren, falls erforderlich
for to_uninstall in installed_softwares(uninstallkey=uninstallkey):
print("Entferne: %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"])