[RESOLVED] Office 2019 64-bit

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
Eyji
Messages: 13
Registration: February 15, 2022 - 09:32

March 16, 2023 - 11:43

Good morning,

I created a repository to install Office 2019 in 32-bit and it works very well.
My problem is I would like to make the same package but for a 64-bit Office 2019 installation.
Could you tell me what mistake I might have made?.

Code: Select all

# 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 configuration file

Code: Select all

<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>
Thanks in advance.
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

March 16, 2023 - 2:06 PM

Hello Mehdi,

what is your WAPT version, OS version (server/client), edition, etc. (see forum rules above)?

What is the original error message?

Regards,

Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Eyji
Messages: 13
Registration: February 15, 2022 - 09:32

March 16, 2023 - 2:36 PM

Good morning,

I am on version 2.3.0.13516, DEBIAN server 10.9 / Windows 10 LTSC 21H2 client.

Here is my error message.

Code: Select all

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
Sincerely,

Mehdi
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

March 16, 2023 - 6:03 PM

Hello again Mehdi,

The following two lines must be kept in the header of the package:

Code: Select all

# -*- coding: UTF-8 -*-
from setuphelpers import *
makepath is a wapt/setuphelpers function and not a native Python function.

Sincerely,

Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Eyji
Messages: 13
Registration: February 15, 2022 - 09:32

March 17, 2023 - 11:07

Hello,

I'm so sorry to have bothered you just for this; I hadn't realized I hadn't copied everything. :?
Thank you for your prompt reply.
Have a good day,

Mehdi
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

March 23, 2023 - 4:41 PM

No worries Medhi, thanks for the feedback!
Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Locked