[RESOLVED] Custom package installation

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
MathieuL
Messages: 14
Registration: January 12, 2021 - 1:14 PM
Location: Normandy

January 12, 2021 - 2:35 PM

Hello,
we have a thick client for our CMMS (corim.exe).
This client changes quite regularly, and I wanted to integrate it into a package template for automatic deployment.
I should mention that I'm new to WAPT. I've installed the server, created a test group for a few computers, set up our application portal which is working, and deployed the antivirus like this...
everything happens automatically upon joining the domain if the computer is in the correct group. I've also integrated Windows updates.

My problem is:
when I run the following command from the command line on a client machine, the installation is successful:
`msiexec /i "CorimProd client.msi" /quiet APPSERVERNAME=SRVCORIM APPSERVERPORTNUMBER=35000`.

I wanted to create a package template from the console using the Tools menu by selecting the command parameters in the "Silent Flags" section.
The program installed, but there's no icon on the desktop, nor even a menu in the applications folder of the test computer.

So I tried modifying setup.py with the following parameters:
`def install():
killalltasks("corim.exe")
run(r'"4.40.7636.0_CorimProd Client.msi" /q appservername=srvgmao appserverportnumber=35000')`

instead of `install_msi_if_needed`.

However, I'm now getting an error, and I don't know what to do after modifying setup.py to ensure it's correctly included in the package.

Thank you in advance for your help.
Last edited by MathieuL on January 19, 2021 - 10:58 AM, edited 1 time.
Wapt 1.8.7334 Enterprise - Windows Server 2016 Datacenter
Admin Console on the server itself
User avatar
Gaetan
Messages: 169
Registration: August 8, 2019 - 10:16
Location: Toulouse

January 13, 2021 - 1:33 PM

Hello,

I think the solution is to do as explained here: https://www.wapt.fr/fr/doc/wapt-create- ... -arguments

This allows you to have install_msi_if_needed and the parameters ;)
MathieuL
Messages: 14
Registration: January 12, 2021 - 1:14 PM
Location: Normandy

January 13, 2021 - 2:59 PM

Thanks for the feedback.
I tried that solution but it still doesn't work, even when installed from the application portal.

Of all the software I've tried to add, Office, Corim, and the Sage client don't work...
I'm a bit lost...

Attached is the error message I get, and below are the parameters passed in setup.py:

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

uninstallkey = []

properties = {
'APPSERVERNAME':SRVGMAO,
'APPSERVERPORTNUMBER':35000,
}

def install():
install_msi_if_needed('4.40.7636.0_CorimProd Client.msi', properties = properties)

def uninstall():
pass
# put here what to do when package is removed from host
# implicit context variables are WAPT, control, user, params, run

def session_setup():
print('Session setup for %s' % control.asrequirement())
# put here what to do when package is configured inside a user session
# implicit context variables are WAPT, control, user, params
Attachments
IMG_20210113_145308.jpg
IMG_20210113_145308.jpg (213.92 KB) Viewed 9208 times
Wapt 1.8.7334 Enterprise - Windows Server 2016 Datacenter
Admin Console on the server itself
MathieuL
Messages: 14
Registration: January 12, 2021 - 1:14 PM
Location: Normandy

January 13, 2021 - 3:38 PM

Actually, I think I have an installation problem.
I watched the following video on Thunderbird: https://www.youtube.com/watch?v=z_EN2CBCTcY

. Using PyScripter, I get error messages as soon as I try to run my packages. I tried launching PyScripter as a user and as an administrator...

Here is the type of error I get:

*** Python 2.7.18 (v2.7.18:8d21aa21f2, Apr 20 2020, 13:19:08) [MSC v.1500 32 bit (Intel)] on win32. ***
*** Remote Python engine is active ***
>>>
*** Remote Interpreter Reinitialized ***
Command Line: install "D:\waptdev\cim-chrome_x64-wapt\WAPT\.."
Traceback (most recent call last):
File "D:\wapt\wapt-get.py", line 24, in
from waptutils import __version__
File "D:\wapt\waptutils.py", line 42, in
import requests
ImportError: No module named requests
>>>
Wapt 1.8.7334 Enterprise - Windows Server 2016 Datacenter
Admin Console on the server itself
MathieuL
Messages: 14
Registration: January 12, 2021 - 1:14 PM
Location: Normandy

January 13, 2021 - 3:58 PM

After reinstalling PyScript and Python, I no longer have errors, but the installation still fails for Office, Sage, and Corim. The install modules, etc., are now working.
Wapt 1.8.7334 Enterprise - Windows Server 2016 Datacenter
Admin Console on the server itself
User avatar
vcardon
WAPT Expert
Messages: 278
Registration: Oct 06, 2017 - 10:55 p.m.
Location: Nantes, France

January 13, 2021 - 7:49 PM

Hello.

It's not recommended to have the WAPT administration console on the WAPT server. The server then becomes a sensitive asset because it effectively hosts the signature key.

It's up to you, but in any case, it's a definite no-no in terms of security.
Vincent CARDON
Tranquil IT
User avatar
Gaetan
Messages: 169
Registration: August 8, 2019 - 10:16
Location: Toulouse

January 14, 2021 - 2:27 PM

Hello,
what is your current deployment structure?
1 server/console/dev workstation?
MathieuL
Messages: 14
Registration: January 12, 2021 - 1:14 PM
Location: Normandy

January 18, 2021 - 09:46

Hello,
currently in the testing phase...
a server and a few workstations are being tested...
I managed to do a silent installation of Office.
I still need to install the Sage client and a CMMS application, which was the original purpose of this post.

Once this test is complete, we'll install the consoles on the two admin workstations.
Wapt 1.8.7334 Enterprise - Windows Server 2016 Datacenter
Admin Console on the server itself
User avatar
Gaetan
Messages: 169
Registration: August 8, 2019 - 10:16
Location: Toulouse

January 18, 2021 - 10:41

Hello,
do non-WAPT applications install correctly using a silent command?
MathieuL
Messages: 14
Registration: January 12, 2021 - 1:14 PM
Location: Normandy

January 18, 2021 - 1:16 PM

Yes,
I set up the antivirus (Apexone endpoint) like that, as well as Firefox, Chrome, and a few others...
Here's what I get when I try to install my "corim.exe":

*** Remote Interpreter Reinitialized ***
Command Line: install "D:\waptdev\cim-corimprod-client-msi_x64_PROD-wapt\WAPT\.."
Using config file: D:\wapt\wapt-get.ini
Installing WAPT files D:\waptdev\cim-corimprod-client-msi_x64_PROD-wapt
2021-01-18 13:13:29,844 CRITICAL Fatal error in install script: CalledProcessErrorOutput: Command 'msiexec /norestart /q /i "4.40.7636.0_CorimProd Client.msi" APPSERVERNAME=SRVGMAO APPSERVERPORTNUMBER=35000' returned non-zero exit status 1603.
Output::
Traceback (most recent call last):
File "D:\wapt\common.py", line 3877, in install_wapt
exitstatus = setup.install()
File "D:\waptdev\cim-corimprod-client-msi_x64_PROD-wapt\setup.py", line 12, in install
install_msi_if_needed('4.40.7636.0_CorimProd Client.msi', properties = properties)
File "D:\wapt\common.py", line 3831, in new_func
return func(*args,**kwargs)
File "D:\wapt\setuphelpers_windows.py", line 1102, in install_msi_if_needed
run(r'msiexec /norestart /q /i "%s" %s' % (msi,props),accept_returncodes=accept_returncodes,timeout=timeout,pidlist=pidlist)
File "D:\wapt\setuphelpers_windows.py", line 3718, in run
raise CalledProcessErrorOutput(proc.returncode,cmd,''.join(output))
CalledProcessErrorOutput: Command 'msiexec /norestart /q /i "4.40.7636.0_CorimProd Client.msi" APPSERVERNAME=SRVGMAO APPSERVERPORTNUMBER=35000' returned non-zero exit status 1603.
Output:

FATAL ERROR: CalledProcessErrorOutput: Command 'msiexec /norestart /q /i "4.40.7636.0_CorimProd Client.msi" APPSERVERNAME=SRVGMAO APPSERVERPORTNUMBER=35000' returned non-zero exit status 1603.
Output:
Exit code: 3
>>>


and here's what I put in the setup.py file:

uninstallkey = []

properties = {
'APPSERVERNAME':'SRVGMAO',
'APPSERVERPORTNUMBER':35000,
}

def install():
install_msi_if_needed('4.40.7636.0_CorimProd Client.msi', properties = properties)
Wapt 1.8.7334 Enterprise - Windows Server 2016 Datacenter
Admin Console on the server itself
Locked