Seite 1 von 2

[GELÖST] Installation von Office 365

Veröffentlicht: 2. August 2019 - 09:32 Uhr
von Minus
Hallo zusammen

Nun ja, ich habe vor ein paar Wochen angefangen, WAPT zu benutzen, nachdem ich einige Jahre lang updateengine verwendet habe.

Diese Migration verlief nicht ganz reibungslos, aber bisher läuft alles gut und ich muss mich nun einer großen Aufgabe stellen: der Bereitstellung von Office365.

Ich habe also einfach das Windows-Bereitstellungstool verwendet, um die neueste Version von Office 365 herunterzuladen, und dann:

Ich habe meine eigene XML-Datei (config-installation.xml) für die Installation generiert:

Code: Alle auswählen

<Configuration>
  <Info Description="Domaine Office Customization V1" />
  <Add OfficeClientEdition="64" Channel="Monthly" ForceUpgrade="TRUE">
    <Product ID="O365BusinessRetail">
      <Language ID="fr-fr" />
      <ExcludeApp ID="Groove" />
      <ExcludeApp ID="Lync" />
    </Product>
  </Add>
  <Property Name="SharedComputerLicensing" Value="0" />
  <Property Name="PinIconsToTaskbar" Value="TRUE" />
  <Property Name="SCLCacheOverride" Value="0" />
  <Property Name="AUTOACTIVATE" Value="FALSE" />
  <Updates Enabled="TRUE" />
  <Updates Branch="Business" />
  <RemoveMSI>
    <IgnoreProduct ID="VisPro" />
    <IgnoreProduct ID="VisStd" />
  </RemoveMSI>
  <AppSettings>
    <Setup Name="Company" Value="Domaine" />
    <User Key="software\microsoft\office\16.0\excel\options" Name="defaultformat" Value="51" Type="REG_DWORD" App="excel16" Id="L_SaveExcelfilesas" />
    <User Key="software\microsoft\office\16.0\powerpoint\options" Name="defaultformat" Value="27" Type="REG_DWORD" App="ppt16" Id="L_SavePowerPointfilesas" />
    <User Key="software\microsoft\office\16.0\word\options" Name="defaultformat" Value="" Type="REG_SZ" App="word16" Id="L_SaveWordfilesas" />
  </AppSettings>
  <Display Level="None" AcceptEULA="TRUE" />
</Configuration>
Erstellen Sie anschließend eine Batch-Datei, um die Installation zu starten

Code: Alle auswählen

@echo off
setup.exe /configure config-installation.xml
exit
Gleiches gilt für den Deinstallationsprozess; hier ist die XML-Datei (config-uninstall.xml):

Code: Alle auswählen

<Configuration>
<Display Level="None" AcceptEULA="True" />
<Property Name="FORCEAPPSHUTDOWN" Value="True" />
<Remove>
<Product ID="O365BusinessRetail">
</Product>
</Remove>
</Configuration>
und die Batch-Datei:

Code: Alle auswählen

@echo off
setup.exe /configure config-uninstall.xml
exit
Wenn die beiden Batch-Dateien einzeln gestartet werden, funktionieren sie einwandfrei und tun genau das, was ich von ihnen verlange

Für Wapt habe ich daher die folgende setup.py-Datei erstellt:

Code: Alle auswählen

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

uninstallkey = []

def install():
	print('installing domaine-Office365Business')
	run('InstallOffice365.bat')

def uninstall():
	print('uninstalling domaine-Office365Business')
	run('UninstallOffice365.bat')
Die Installation funktioniert einwandfrei beim Neustart oder Herunterfahren des Rechners, die Deinstallation hingegen funktioniert überhaupt nicht.

Zur Deinstallation: Hier sind die Informationen, die ich aus Windows extrahieren konnte:

Code: Alle auswählen

sofware name: Microsoft Office 365 Business - fr-fr
Uninstall key: O365BusinessRetail - fr-fr
version: 16.0.11727.20244
Es gibt sicherlich viel einfachere und sauberere Wege, dies auf allen Ebenen zu tun, daher bin ich voll dafür, insbesondere wenn Folgendes berücksichtigt wird:

Eine Installation, die ohne Neustart des Rechners durchgeführt werden kann
eine Deinstallation, die über die WAPT-Konsole funktioniert

Vielen Dank im Voraus für Ihre Hilfe, die es mir auch ermöglicht, mehr über WAPT zu erfahren

Debian 9.9 Server
WAPT 1.5.1.26
W10 Paketerstellungsstation

Betreff: Office 365-Installation

Veröffentlicht: 2. August 2019 – 14:13 Uhr
von Christophe0110
Hallo !

Ich habe mich also letzte Woche mit diesem Paket für Office 365 Business (2019) beschäftigt...
Ich möchte daher meine setup.py-Datei teilen:

Code: Alle auswählen

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

uninstallkey = []

def install():

    if not installed_softwares(u'O365BusinessRetail'):
        print('Microsoft Office 365 Business 2019 : Installing...')

        killalltasks(['WINWORD.EXE','POWERPNT.EXE','EXCEL.exe','MSPUB.EXE','MSACCESS.EXE','INFOPATH.EXE','lync.exe','ONENOTE.EXE','OUTLOOK.EXE','ONENOTEM.EXE','MSOSYNC.EXE','GROOVE.EXE'])

        run(u'setup.exe /configure Configuration.xml',timeout=2000,accept_returncodes=[1641,3010,0])

        print('Microsoft Office 365 Business 2019 : Installation complete')
    else:
        print('Microsoft Office 365 Business 2019 : Already installed !')

    if not isdir(makepath(programfiles32,'Microsoft Office','OfficeClickToRunWAPTUninstall')):
        mkdirs(makepath(programfiles32,'Microsoft Office','OfficeClickToRunWAPTUninstall'))
    filecopyto('setup.exe',makepath(programfiles32,'Microsoft Office','OfficeClickToRunWAPTUninstall','setup.exe'))
    filecopyto('ConfigurationUninstall.xml',makepath(programfiles32,'Microsoft Office','OfficeClickToRunWAPTUninstall','ConfigurationUninstall.xml'))

def uninstall():

    print('Microsoft Office 365 Business 2019 : Uninstalling...')

    #Closing applications :
    killalltasks(['WINWORD.EXE','POWERPNT.EXE','EXCEL.exe','MSPUB.EXE','MSACCESS.EXE','INFOPATH.EXE','lync.exe','ONENOTE.EXE','OUTLOOK.EXE','ONENOTEM.EXE','MSOSYNC.EXE','GROOVE.EXE'])

    #Uninstalling :
    if installed_softwares(u'O365BusinessRetail'):
        if isfile(makepath(programfiles32,'Microsoft Office','OfficeClickToRunWAPTUninstall','setup.exe')):
            run('"' + makepath(programfiles32,'Microsoft Office','OfficeClickToRunWAPTUninstall','setup.exe') + r'" /configure ConfigurationUninstall.xml',timeout=2000,accept_returncodes=[1641,3010,0])
            remove_file(makepath(programfiles32,'Microsoft Office','OfficeClickToRunWAPTUninstall','setup.exe'))
            remove_file(makepath(programfiles32,'Microsoft Office','OfficeClickToRunWAPTUninstall','ConfigurationUninstall.xml'))
            if dir_is_empty(makepath(programfiles32,'Microsoft Office','OfficeClickToRunWAPTUninstall')):
                remove_tree(makepath(programfiles32,'Microsoft Office','OfficeClickToRunWAPTUninstall'))

    print('Microsoft Office 365 Business 2019 : Uninstallation complete')


Im Stammverzeichnis des Pakets habe ich die Datei „setup.exe“ sowie das Verzeichnis „Office“, das mit dem zuvor ausgeführten Befehl „setup.exe /download configuration.xml“ heruntergeladen wurde, abgelegt

Hier ist der Inhalt der Datei configuration.xml (Sie können diese jedoch nach Ihren Wünschen konfigurieren):

Code: Alle auswählen

<Configuration ID="30ca9b8e-4c43-4a87-a12f-1e5966fdce99">
  <Info Description="NomSociete" />
  <Add OfficeClientEdition="32" Channel="Insiders" ForceUpgrade="TRUE">
    <Product ID="O365BusinessRetail">
      <Language ID="fr-fr" />
      <ExcludeApp ID="Groove" />
      <ExcludeApp ID="Lync" />
    </Product>
    <Product ID="ProofingTools">
      <Language ID="en-us" />
    </Product>
  </Add>
  <Property Name="SharedComputerLicensing" Value="0" />
  <Property Name="PinIconsToTaskbar" Value="TRUE" />
  <Property Name="SCLCacheOverride" Value="0" />
  <Property Name="AUTOACTIVATE" Value="FALSE" />
  <Updates Enabled="TRUE" />
  <RemoveMSI>
    <IgnoreProduct ID="VisPro" />
    <IgnoreProduct ID="VisStd" />
  </RemoveMSI>
  <AppSettings>
    <Setup Name="Company" Value="NomSociete" />
    <User Key="software\microsoft\office\16.0\access\security" Name="vbawarnings" Value="1" Type="REG_DWORD" App="access16" Id="L_VBAWarningsPolicy" />
    <User Key="software\microsoft\office\16.0\excel\options" Name="defaultformat" Value="51" Type="REG_DWORD" App="excel16" Id="L_SaveExcelfilesas" />
    <User Key="software\microsoft\office\16.0\powerpoint\options" Name="defaultformat" Value="27" Type="REG_DWORD" App="ppt16" Id="L_SavePowerPointfilesas" />
    <User Key="software\microsoft\office\16.0\word\options" Name="defaultformat" Value="" Type="REG_SZ" App="word16" Id="L_SaveWordfilesas" />
  </AppSettings>
  <Display Level="None" AcceptEULA="TRUE" />
  <Logging Level="Off" />
</Configuration>
Und der Inhalt der Datei configurationUninstall.xml:

Code: Alle auswählen

<Configuration>
  <Display Level="None" AcceptEULA="TRUE" />
  <Property Name="FORCEAPPSHUTDOWN" Value="True" />
  <Remove>
    <Product ID="O365BusinessRetail">
      <Language ID="fr-fr" />
    </Product>
  </Remove>
  <Logging Level="Off" />
</Configuration>
Wie Sie dem Code entnehmen können, kopiere ich während der Installation die Datei "setup.exe" und die Datei "ConfigurationUninstall.xml" in einen Ordner, der unter "Microsoft Office" erstellt wurde.
Dann verwende ich es zur Deinstallation...

Es funktioniert einwandfrei ;)

A+
Chris.

Betreff: Office 365-Installation

Veröffentlicht: 2. August 2019 – 15:16 Uhr
von Minus
Das ist

super, vielen Dank Christophe0110!

Okay, ich bin jetzt im Urlaub, aber sobald ich wieder im Büro bin, werde ich mein Office aktualisieren.

Ich halte dich auf dem Laufenden.

Betreff: Office 365-Installation

Veröffentlicht: 7. November 2019 - 17:26 Uhr
von Ben
Guten Morgen,

Ich bin ebenfalls dabei, die Einführung von O365 zu planen. Mein Plan basiert auf der Arbeit von Christophe0110 (vielen Dank an ihn!), aber ich stoße auf ein Problem.
Der Installationsprozess funktioniert einwandfrei. Er verläuft korrekt und berücksichtigt die Konfigurations-XML-Datei.

Die Deinstallation schlägt jedoch fehl: Ich kann das Skript zwar erfolgreich ausführen (die Dateien und der Ordner „OfficeClickToRunWAPTUninstall“ werden korrekt gelöscht), aber Office 365 bleibt auf dem Rechner installiert. In der WAPT-Konsole ist das Paket nicht mehr sichtbar, als wäre alles reibungslos verlaufen.

Anscheinend verursacht die folgende Zeile das Problem und verhindert den Start des Installationsprogramms:

Code: Alle auswählen

run('"' + makepath(programfiles32,'Microsoft Office','OfficeClickToRunWAPTUninstall','setup.exe') + r'" /configure ConfigurationUninstall.xml',timeout=2000,accept_returncodes=[1641,3010,0])
Hat irgendjemand eine Idee? Ich bin ratlos

DANKE !

Betreff: Office 365-Installation

Veröffentlicht: 13. November 2019 - 11:44 Uhr
von Ben
Ich habe mein Problem gelöst, und zwar ganz einfach: Für die Deinstallation musste der absolute Pfad zur XML-Datei angegeben werden (im Gegensatz zu dem, was im obigen Skript vorgeschlagen wurde).

Hier ist mein vollständiges Skript:

Code: Alle auswählen

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

uninstallkey = []

def install():

    if not installed_softwares(u'O365BusinessRetail'):
        print('Microsoft Office 365 Business 2019 : Installation...')

        killalltasks(['WINWORD.EXE','POWERPNT.EXE','EXCEL.exe','MSPUB.EXE','MSACCESS.EXE','INFOPATH.EXE','lync.exe','ONENOTE.EXE','OUTLOOK.EXE','ONENOTEM.EXE','MSOSYNC.EXE','GROOVE.EXE'])

        run(u'setup.exe /configure install.xml',timeout=2000,accept_returncodes=[1641,3010,0])

        print('Microsoft Office 365 Business 2019 : Installation complete')
    else:
        print('Microsoft Office 365 Business 2019 : Already installed !')

    if not isdir(makepath(programfiles32,'Microsoft Office','OfficeClickToRunWAPTUninstall')):
        mkdirs(makepath(programfiles32,'Microsoft Office','OfficeClickToRunWAPTUninstall'))
    filecopyto('setup.exe',makepath(programfiles32,'Microsoft Office','OfficeClickToRunWAPTUninstall','setup.exe'))
    filecopyto('uninstall.xml',makepath(programfiles32,'Microsoft Office','OfficeClickToRunWAPTUninstall','uninstall.xml'))
    filecopyto('uninstall.bat',makepath(programfiles32,'Microsoft Office','OfficeClickToRunWAPTUninstall','uninstall.bat'))

def uninstall():

    print('Microsoft Office 365 Business 2019 : Uninstalling...')

    uninstallstring ='"%s\Microsoft Office\OfficeClickToRunWAPTUninstall\setup.exe" /configure "%s\Microsoft Office\OfficeClickToRunWAPTUninstall\uninstall.xml"' % (programfiles32,programfiles32)

    #Closing applications :
    killalltasks(['WINWORD.EXE','POWERPNT.EXE','EXCEL.exe','MSPUB.EXE','MSACCESS.EXE','INFOPATH.EXE','lync.exe','ONENOTE.EXE','OUTLOOK.EXE','ONENOTEM.EXE','MSOSYNC.EXE','GROOVE.EXE'])

    #Uninstalling :
    if installed_softwares(u'O365BusinessRetail'):
        print('O365 a ete trouve.')
        if isfile(makepath(programfiles32,'Microsoft Office','OfficeClickToRunWAPTUninstall','setup.exe')):
            print('Setup.exe trouve. Lancement de la commande de desinstallation ('+uninstallstring+')')

            run(uninstallstring,timeout=2000,accept_returncodes=[1641,3010,0])

            print('Nettoyage des fichiers de desinstallation.')
            remove_file(makepath(programfiles32,'Microsoft Office','OfficeClickToRunWAPTUninstall','setup.exe'))
            remove_file(makepath(programfiles32,'Microsoft Office','OfficeClickToRunWAPTUninstall','uninstall.xml'))
            remove_file(makepath(programfiles32,'Microsoft Office','OfficeClickToRunWAPTUninstall','uninstall.bat'))

            print('Suppression du dossier.')
            if dir_is_empty(makepath(programfiles32,'Microsoft Office','OfficeClickToRunWAPTUninstall')):
                remove_tree(makepath(programfiles32,'Microsoft Office','OfficeClickToRunWAPTUninstall'))

    print('Microsoft Office 365 Business 2019 : Uninstallation complete')

Betreff: Office 365-Installation

Veröffentlicht: 14. November 2019 – 14:57 Uhr
von Christophe0110
Hallo Ben,

das ist wirklich seltsam, denn bei mir funktioniert es auch ohne den vollständigen Pfad zur XML-Datei.

Falls es aber so funktioniert, passe ich mein Skript vorsichtshalber an (man weiß ja nie, vielleicht klappt es bei manchen und bei anderen nicht).

Viele Grüße!

Betreff: Office 365-Installation

Veröffentlicht: 24. Februar 2020 - 11:42 Uhr
von Minus
Hallo Christophe0110,

es tut mir leid, dass ich vergessen habe, wie versprochen Feedback zu geben :Hoppla: :Hoppla:

. Es funktioniert einwandfrei.

Ich habe ein paar Kleinigkeiten angepasst, und ehrlich gesagt, es läuft super.

Danke fürs Teilen!

Betreff: [GELÖST] Installation von Office 365

Veröffentlicht: 2. März 2020 - 11:49 Uhr
von Christophe0110
Es war nichts ;)

Office365-Installation

Veröffentlicht: 19. August 2020 - 10:12 Uhr
von srvmac
Hallo zusammen,

Ich kontaktiere Sie, weil ich Office 365 installieren muss und Ihrem Rat gefolgt bin und die von Ihnen bereitgestellte setup.py-Datei verwendet habe.

Trotzdem tritt ein Paketinstallationsfehler auf, wenn ich die Installation über die Wapt-Konsole oder vom Client-PC über die Wapt-Bibliothek starte.

Die Fehlermeldung lautet: Ein Vorgang ist fehlgeschlagen. Möchten Sie die Installation/Deinstallation erzwingen? Ja oder Nein spielt keine Rolle.

Die setup.exe-Datei läuft lokal einwandfrei, und ich habe den Office-Ordner im Stammverzeichnis erfolgreich mit dem Befehl `setup.exe /download installOfficeBusRet64.xml` erstellt. Dadurch wurden alle Dateien von Microsoft heruntergeladen und im Ordner waptdev/office365 im Stammverzeichnis abgelegt.

Meine Konfigurationsdatei:

Code: Alle auswählen

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

uninstallkey = []

def install():

    if not installed_softwares(u'O365BusinessRetail'):
        print('Microsoft Office 365 Business 2019 : Installing...')

        killalltasks(['WINWORD.EXE','POWERPNT.EXE','EXCEL.exe','MSPUB.EXE','MSACCESS.EXE','INFOPATH.EXE','lync.exe','ONENOTE.EXE','OUTLOOK.EXE','ONENOTEM.EXE','MSOSYNC.EXE','GROOVE.EXE'])

        run(u'setup.exe /configure installOfficeBusRet64.xml',timeout=2000,accept_returncodes=[1641,3010,0])

        print('Microsoft Office 365 Business 2019 : Installation complete')
    else:
        print('Microsoft Office 365 Business 2019 : Already installed !')

    if not isdir(makepath(programfiles32,'Microsoft Office','OfficeClickToRunWAPTUninstall')):
        mkdirs(makepath(programfiles32,'Microsoft Office','OfficeClickToRunWAPTUninstall'))
    filecopyto('setup.exe',makepath(programfiles32,'Microsoft Office','OfficeClickToRunWAPTUninstall','setup.exe'))
    filecopyto('ConfigurationUninstall.xml',makepath(programfiles32,'Microsoft Office','OfficeClickToRunWAPTUninstall','ConfigurationUninstall.xml'))

def uninstall():

    print('Microsoft Office 365 Business 2019 : Uninstalling...')

    #Closing applications :
    killalltasks(['WINWORD.EXE','POWERPNT.EXE','EXCEL.exe','MSPUB.EXE','MSACCESS.EXE','INFOPATH.EXE','lync.exe','ONENOTE.EXE','OUTLOOK.EXE','ONENOTEM.EXE','MSOSYNC.EXE','GROOVE.EXE'])

    #Uninstalling :
    if installed_softwares(u'O365BusinessRetail'):
        if isfile(makepath(programfiles32,'Microsoft Office','OfficeClickToRunWAPTUninstall','setup.exe')):
            run('"' + makepath(programfiles32,'Microsoft Office','OfficeClickToRunWAPTUninstall','setup.exe') + r'" /configure ConfigurationUninstall.xml',timeout=2000,accept_returncodes=[1641,3010,0])
            remove_file(makepath(programfiles32,'Microsoft Office','OfficeClickToRunWAPTUninstall','setup.exe'))
            remove_file(makepath(programfiles32,'Microsoft Office','OfficeClickToRunWAPTUninstall','ConfigurationUninstall.xml'))
            if dir_is_empty(makepath(programfiles32,'Microsoft Office','OfficeClickToRunWAPTUninstall')):
                remove_tree(makepath(programfiles32,'Microsoft Office','OfficeClickToRunWAPTUninstall'))

    print('Microsoft Office 365 Business 2019 : Uninstallation complete')

Ich danke Ihnen für Ihre Hilfe.

Seb

Betreff: [GELÖST] Installation von Office 365

Veröffentlicht: 5. Januar 2021 - 9:55 Uhr
von Christophe0110
Hallo Seb,

Ich sehe Ihre Nachricht erst jetzt, als ich meine alten Nachrichten durchgesehen habe...
Entschuldigung für die 6-monatige Verzögerung...

Konnten Sie Ihr Problem lösen?

Wenn Sie sagen:
Die setup.exe-Datei läuft lokal einwandfrei, und ich habe den Office-Ordner im Stammverzeichnis erfolgreich mit dem Befehl `setup.exe /download installOfficeBusRet64.xml` erstellt. Dadurch wurden alle Dateien von Microsoft heruntergeladen und im Ordner waptdev/office365 im Stammverzeichnis abgelegt.
Beachten Sie, dass diese Dateien in einem Ordner namens „Office“ im Paketverzeichnis abgelegt werden müssen (nicht direkt im Stammverzeichnis des Pakets).
Und lassen Sie die setup.exe-Datei neben dem Ordner „Office“ liegen...

A+
Christophe.