[SOLVED] “Returned non-zero exit status” error

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
User avatar
Gaetan
Messages: 169
Registration: August 8, 2019 - 10:16
Location: Toulouse

September 23, 2019 - 4:37 PM

Hello everyone,
I'm trying to create a package using the DELL Command update.

Here is the code:

Code: Select all

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

uninstallkey = []

CommandVendor = 'wmic systemenclosure get manufacturer'

Vendor = str(run(CommandVendor))

def install():

    if Vendor.find('Dell Inc.') != -1:
        print('installing tls-dell-command-update-3.0.1-a00')
        install_exe_if_needed("Dell-Command-Update_Y2KWD_WIN_3.0.1_A00.EXE",'/s',key='',min_version='3.0.1-a00')
This turns me on:

Code: Select all

2019-09-23 16:33:13,230 CRITICAL Fatal error in install script: CalledProcessErrorOutput: Command '"Dell-Command-Update_Y2KWD_WIN_3.0.1_A00.EXE" /s' returned non-zero exit status 2.
Output::
Traceback (most recent call last):
  File "C:\Program Files (x86)\wapt\common.py", line 3846, in install_wapt
    exitstatus = setup.install()
  File "C:\waptdev\tls-dell-command-update-3.0.1-a00-wapt\setup.py", line 14, in install
    install_exe_if_needed("Dell-Command-Update_Y2KWD_WIN_3.0.1_A00.EXE",'/s',key='',min_version='')
  File "C:\Program Files (x86)\wapt\common.py", line 3802, in new_func
    return func(*args,**kwargs)
  File "C:\Program Files (x86)\wapt\setuphelpers.py", line 4227, in install_exe_if_needed
    run(r'"%s" %s' % (exe,silentflags),accept_returncodes=accept_returncodes,timeout=timeout,pidlist=pidlist)
  File "C:\Program Files (x86)\wapt\setuphelpers.py", line 1061, in run
    raise CalledProcessErrorOutput(proc.returncode,cmd,''.join(output))
CalledProcessErrorOutput: Command '"Dell-Command-Update_Y2KWD_WIN_3.0.1_A00.EXE" /s' returned non-zero exit status 2.
Output:

FATAL ERROR : CalledProcessErrorOutput: Command '"Dell-Command-Update_Y2KWD_WIN_3.0.1_A00.EXE" /s' returned non-zero exit status 2.
Output:
Exit code:  3
The error, if I'm not mistaken, indicates that the file does not exist.
I've searched high and low, but I can't understand the error.

If you have an idea.
THANKS

- Installed WAPT version (1.7)
- Linux server OS and CentOS 7 version
- Operating system of the administration machine/creation of Windows 10 packages
Last edited by Gaetan on 30 Sep 2019 - 12:32, edited 1 time.
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

September 26, 2019 - 11:18

Hello,

the command "Dell-Command-Update_Y2KWD_WIN_3.0.1_A00.EXE" /s returns error code 2, a

non-standard code.

WAPT accepts 0 and 3010.
User avatar
Gaetan
Messages: 169
Registration: August 8, 2019 - 10:16
Location: Toulouse

September 26, 2019 - 1:50 PM

Hello,
yes, I am aware of the codes accepted by WAPT and the meaning of code 2.
However, I don't understand why WAPT cannot complete the installation when it works via the command line and with other Dell software.
Is there a way to get a more verbose output?

Thank you.
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

September 26, 2019 - 5:19 PM

Normally you have "Output:" at the end.

But it's quite possible that the output returns nothing.

2 might be a normal return code, and the software is properly installed.
User avatar
Gaetan
Messages: 169
Registration: August 8, 2019 - 10:16
Location: Toulouse

September 30, 2019 - 12:15

Good morning,
Yes, the package is indeed installed.
So I changed the code, adding a presence test in the process.
Here is the code:

Code: Select all

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

uninstallkey = []

CommandVendor = 'wmic systemenclosure get manufacturer'

Vendor = str(run(CommandVendor))

def install():
    print('installing tls-dell-command-update-3.0.1-a00')

    if Vendor.find('Dell Inc.') != -1:
        if os.path.isdir('C:\Program Files\Dell\CommandUpdate') == False:
            install_exe_if_needed("Dell-Command-Update_Y2KWD_WIN_3.0.1_A00.EXE",'/s',key='',min_version='')
            print('Installé sur un PC DELL')
            pass
Thank you for your help ;)
Locked