Page 1 of 1

[SOLVED] UNC path as msi argument

Published: May 30, 2023 - 3:04 PM
by cefinformatique
Good morning,

I am trying to install a "DR" software which requires the following arguments:
- PATHRENSEIGNE='"1"'
- TYPEINSTALL"="PORTABLE"
- EXE="C:\EIC\DR\Application"
- DATA="C:\EIC\DR\Application\DATA"
- NETWORKDATA="\\myserver\SRV\DRData"

So I created the setup.py file as follows:

Code: Select all

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

r"""
Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()

"""
# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls
uninstallkey = ["{61D2EDA6-1B60-49A2-9167-159BA73B2897}"]

def install():
        # Declaring local variables
        install_laptop_properties = {
            "PATHRENSEIGNE":'"1"',
            "TYPEINSTALL":'"PORTABLE"',
            "EXE":"C:\EIC\DR\Application",
            "DONNEES":"C:\EIC\DR\Application\DONNEES'",
            "DONNEESRESEAU":"\\monserveur\SRV\DRData'",
        }
        # Installing the software
        print("Installation: DR")
        install_msi_if_needed('DR.msi', properties = install_laptop_properties)
Unfortunately, I get the following error:

Code: Select all

CRITICAL Fatal error in install script: CalledProcessErrorOutput: Command 'msiexec /norestart /q /i "DR.msi" PATHRENSEIGNE="1" TYPEINSTALL="PORTABLE" EXE=C:\\EIC\\DR\\Application\ DONNEES=C:\\EIC\\DR\\Application\\DONNEES DONNEESRESEAU=\\\\fichiers.wizzyoo.info\\WZY\\DRData' returned non-zero exit status 1603.
So I have two questions:
- Does the fact that the backslashes are doubled pose a problem for the installation?
- How can I add a /L*v "log.log" option to get the msi installation logs?

Re: UNC path as an MSI argument

Published: May 30, 2023 - 4:08 PM
by cefinformatique
If I use:

Code: Select all

"EXE":r'C:\EIC\DR\Application',
instead of :

Code: Select all

"EXE":"C:\EIC\DR\Application",
It works under VSCodium, however I still get the following error during package installation with WAPT:

Code: Select all

Installation: DR
Installing: DR.msi (5.7.0302)
Traceback (most recent call last):
  File "C:\Program Files (x86)\wapt\common.py", line 4074, in install_wapt
    exitstatus = setup.install()
  File "C:\WINDOWS\TEMP\waptz5r69e_d\setup.py", line 55, in install
  File "C:\Program Files (x86)\wapt\common.py", line 4024, in new_func
    return func(*args, **kwargs)
  File "C:\Program Files (x86)\wapt\setuphelpers_windows.py", line 1449, in install_msi_if_needed
    run(r'msiexec /norestart /q /i "%s" %s' % (msi, props), accept_returncodes=accept_returncodes, timeout=timeout, pidlist=pidlist)
  File "C:\Program Files (x86)\wapt\waptutils.py", line 2112, in run
    raise CalledProcessErrorOutput(proc.returncode, cmd, ''.join(output))
waptutils.CalledProcessErrorOutput: Command 'msiexec /norestart /q /i "DR.msi" PATHRENSEIGNE=1 TYPEINSTALL=POSTE TYPEPOSTE=2 EXE=C:\\EIC\\DR\\Application DONNEES=\\\\monserveur\\SRV\\DRData' returned non-zero exit status 1603.
Output:

CalledProcessErrorOutput: Command 'msiexec /norestart /q /i "DR.msi" PATHRENSEIGNE=1 TYPEINSTALL=POSTE TYPEPOSTE=2 EXE=C:\\EIC\\DR\\Application DONNEES=\\\\monserveur\\SRV\\DRData' returned non-zero exit status 1603.
Output:

Re: UNC path as an MSI argument

Published: May 31, 2023 - 09:04
by cefinformatique
I ultimately think the problem lies with the software itself, so it's unrelated to the WAPT package.

In any case, I've bypassed the requirement to specify arguments in the setup.py file by generating an MST response file instead.

Re: [SOLVED] UNC path as msi argument

Published: May 31, 2023 - 09:45
by sfonteneau
In the arguments you have DATA which points to a server using UNC.

Is it possible that the data needs to be accessible by the machine at the time of installation for the installation to work?