Seite 1 von 1

[GELÖST] Office 2019 64-Bit

Veröffentlicht: 16. März 2023 - 11:43 Uhr
von Eyji
Guten Morgen,

Ich habe ein Repository erstellt, um Office 2019 in der 32-Bit-Version zu installieren, und es funktioniert sehr gut.
Mein Problem ist, dass ich dasselbe Paket auch für eine 64-Bit-Installation von Office 2019 erstellen möchte.
Könnten Sie mir sagen, welchen Fehler ich möglicherweise gemacht habe?.

Code: Alle auswählen

# https://github.com/YerongAI/Office-Tool
#
# You should also check for the uninstall string for uninstall_args by using : wapt-get list-registry Office

uninstallkey = []

# raccourcis
RaccourcisDossierProgramm1 = makepath(programfiles32,"Microsoft Office","root","Office16")

softname = "Microsoft Office Professional Plus 2019 - fr-fr"
pgmsoffice = programfiles
uninstall_args = r'scenario=install scenariosubtype=ARP sourcetype=None productstoremove=ProPlus2019Volume.16_fr-fr_x-none culture=fr-fr version.16=16.0 DisplayLevel=False'

def install():
    killalltasks('WINWORD.EXE')
    killalltasks('POWERPNT.EXE')
    killalltasks('EXCEL.EXE')
    killalltasks('MSPUB.EXE')
    killalltasks('MSACCESS.EXE')
    killalltasks('INFOPATH.EXE')
    killalltasks('lync.exe')
    killalltasks('ONENOTE.EXE')
    killalltasks('OUTLOOK.EXE')
    killalltasks('ONENOTEM.EXE')
    killalltasks('MSOSYNC.EXE')
    killalltasks('GROOVE.EXE')

    print('installing %s'.format(control.asrequirement()))

    office_installed = installed_softwares(softname)

    cmd = r'"setup.exe" /configure "Configuration-office2019.xml"'

    if not office_installed:
        print('Installing {}'.format(softname))
        run(cmd,timeout=1200,accept_returncodes=[1641,3010,0])
    else:
        if Version(office_installed[0]['version']) < Version(control.version.split('-',1)[0]):
            run(cmd,timeout=1200,accept_returncodes=[1641,3010,0])
        else:
            print('{} already up to date or newer : {}'.format(softname,office_installed[0]['version']))

    if not installed_softwares(softname):
        error(' {} has been installed but the uninstall key can not be found'.format(softname))

    create_desktop_shortcut(r'Word',target=r'C:\Program Files\Microsoft Office\root\Office16\WINWORD.EXE')
    create_desktop_shortcut(r'Excel',target=r'C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE')
    create_desktop_shortcut(r'Outlook',target=r'C:\Program Files\Microsoft Office\root\Office16\OUTLOOK.EXE')
    create_desktop_shortcut(r'PowerPoint',target=r'C:\Program Files\Microsoft Office\root\Office16\POWERPNT.EXE')
XML-Konfigurationsdatei

Code: Alle auswählen

<Configuration>
  <Add OfficeClientEdition="64" Channel="PerpetualVL2019">
    <Product ID="ProPlus2019Volume">
      <Language ID="fr-fr" />
    </Product>
  </Add>
  <RemoveMSI>
    <IgnoreProduct ID="VisPro" />
    <IgnoreProduct ID="VisStd" />
  </RemoveMSI>
  <Display Level="None" AcceptEULA="TRUE" /> 
</Configuration>
Dank im Voraus.

Betreff: Office 2019 64-Bit

Veröffentlicht: 16. März 2023 – 14:06 Uhr
von dcardon
Hallo Mehdi,

welche WAPT-Version, Betriebssystemversion (Server/Client), Edition usw. verwendest du (siehe Forenregeln oben)?

Wie lautet die ursprüngliche Fehlermeldung?

Viele Grüße,

Denis

Betreff: Office 2019 64-Bit

Veröffentlicht: 16. März 2023 – 14:36 ​​Uhr
von Eyji
Guten Morgen,

Ich verwende Version 2.3.0.13516, DEBIAN Server 10.9 / Windows 10 LTSC 21H2 Client.

Hier ist meine Fehlermeldung.

Code: Alle auswählen

Traceback (most recent call last):
  File "C:\Program Files (x86)\wapt\common.py", line 4001, in install_wapt
    setup = import_setup(setup_filename)
  File "C:\Program Files (x86)\wapt\waptutils.py", line 1520, in import_setup
    py_mod = imp.load_source(modulename, setupfilename)
  File "imp.py", line 171, in load_source
  File "<frozen importlib._bootstrap>", line 702, in _load
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 843, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "C:\Windows\TEMP\waptom4sqfqv\setup.py", line 8, in <module>
NameError: name 'makepath' is not defined

NameError: name 'makepath' is not defined
Aufrichtig,

Mehdi

Betreff: Office 2019 64-Bit

Veröffentlicht: 16. März 2023 – 18:03 Uhr
von dcardon
Hallo nochmal Mehdi,

Die folgenden zwei Zeilen müssen im Header des Pakets enthalten sein:

Code: Alle auswählen

# -*- coding: UTF-8 -*-
from setuphelpers import *
makepath ist eine Funktion aus wapt/setuphelpers und keine native Python-Funktion.

Aufrichtig,

Denis

Betreff: Office 2019 64-Bit

Veröffentlicht: 17. März 2023 - 11:07 Uhr
von Eyji
Hallo,

es tut mir sehr leid, Sie damit belästigt zu haben; mir war gar nicht aufgefallen, dass ich nicht alles kopiert hatte. :?
Vielen Dank für Ihre schnelle Antwort.
Schönen Tag noch,

Mehdi.

Betreff: [GELÖST] Office 2019 64-Bit

Veröffentlicht: 23. März 2023 – 16:41 Uhr
von dcardon
Kein Problem, Medhi, danke für das Feedback!
Denis