Page 1 of 1

configuration.xml problem tis-microsoft-office-365-enterprise

Published: February 27, 2024 - 10:51 AM
by Gerald
Hello,

Our company has chosen WAPT for application uploads, so I inherited this task 15 days before the production launch and the WAPT installation of the Microsoft Office package. I should mention that I'm not familiar with WAPT and have had little time to learn it.

I downloaded the tis-microsoft-office-365-enterprise package from the Microsoft Store. The installation went very smoothly, except for an audit error on some machines, but it's not a major issue at the moment.

However, I've noticed a problem. My configuration.xml response file isn't being recognized. Have I missed something?
The file is stored on my server in the root directory, near setup.exe.

If anyone has any insights,
or if you need any further information, I'm happy to provide it.

Re: Problem with configuration.xml tis-microsoft-office-365-entreprise

Published: February 28, 2024 - 4:58 PM
by dcardon
Hello Gerald,
Gérald wrote: Feb 27, 2024 - 10:51 The file is stored on my server at the root level within setup.exe.
When you say "on the server", do you mean in the WAPT package? You need to edit the package and replace the configuration.xml file inside it.

Alternatively, you can also use the package https://wapt.tranquil.it/store/en/tis-m...e-template which offers an update_package that guides you through the package preparation process.

Sincerely,

Denis

Re: Problem with configuration.xml tis-microsoft-office-365-entreprise

Published: February 29, 2024 - 3:48 PM
by Gerald
Hello,

being a complete beginner, I don't yet understand the concept of a package.

Is it the .wapt file or the directory (where the installation files are stored)?
My configuration file is in the c:\waptdev\microsoft-office-etc... directory.

I must be missing something.

Re: Problem with configuration.xml tis-microsoft-office-365-entreprise

Published: February 29, 2024 - 8:21 PM
by vcardon
Hello Gerald,

This section of the documentation will help you understand the concept of a packet in WAPT.

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

Re: Problem with configuration.xml tis-microsoft-office-365-entreprise

Published: March 1, 2024 - 11:53
by Gerald
Thanks, so I was right.

However, that doesn't explain why my answer file isn't being recognized.
The package structure is correct. My configuration file is indeed in the root directory and at the same level as setup.exe.

Below is my setup.py file, which I haven't modified. It's the one from the original package.

There's still one line that bothers me:

# TODO "setup.exe /customize configuration.xml if up-to-date" Is there any action I need to take after inserting my file, like a rebuild/repack?






File 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():
# 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")

# uninstalling other versions of office if needed
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& ... 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):
# Initializing variables
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>
"""
# 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"""
<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"""
<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"])