[SOLVED] Issue creating Kaspersky MSI package

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

August 8, 2019 - 2:58 PM

Hello everyone,

I had the problem described in this thread:

viewtopic.php?t=1891

So I tried to work around it using this code:

Code: Select all

# -*- coding: utf-8 -*-
import subprocess

uninstallkey = []

def install():
    print('installing tls-agent-kav-10-installer')
    subprocess.call(["msiexec", "/i 'Kaspersky_Network_Agent.msi' /qn /l*vx c:\windows\temp\nag_inst.log SERVERADDRESS='\\kamoulox' DONT_USE_ANSWER_FILE=1 EULA=1 PRIVACYPOLICY=1"])
It's spinning but displaying this:
wapt.PNG
wapt.PNG (17.28 KB) Viewed 6408 times
Through research, I read that this would come from the msiexec line and its parameters.
This command works fine when launched by PowerShell.

Do you have any 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 August 23, 2019 - 11:19, edited 3 times.
User avatar
jpele
Messages: 156
Registration: March 4, 2019 - 12:01
Location: Nantes

August 8, 2019 - 3:13 PM

Hello,

Subprocess is not necessary. I suggest you test the installation with the "install_msi_if_needed" function.
A CTRL + left click will allow you to access all the functions and parameters.

For your new packages, I would advise you to use the "generate a package template" tool available in the WAPT console and documented here:
https://www.wapt.fr/fr/doc/wapt-create- ... index.html

Sincerely,
Jimmy
User avatar
Gaetan
Messages: 169
Registration: August 8, 2019 - 10:16
Location: Toulouse

August 9, 2019 - 09:13

Hello,

I didn't explain my initial question very well.
I've already tried using that function, but it gives me the same result as the issue I mentioned in my first message.

The solution isn't fully provided, and I don't know how to perform a clean installation as instructed.

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

August 9, 2019 - 1:51 PM

Hello, following the Zabbix documentation: https://www.zabbix.com/documentation/4. ... es/win_msi

And following the Wapt documentation:https://doc.ad.tranquil.it/wapt/fr/doc/ ... -arguments

It works

Code: Select all

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

uninstallkey = []

def install():
    print('installing zabbix-agent')

    properties = {
        'LOGTYPE':'file',
        'LOGFILE':r'c:\za.log',
        'ENABLEREMOTECOMMANDS':'1',
        'SERVER':'192.168.6.76',
        'LISTENPORT':'12345',
        'SERVERACTIVE':'::1',
        'HOSTNAME':'myHost',
        'TLSCONNECT':'psk',
        'TLSACCEPT':'psk',
        'TLSPSKIDENTITY':'MyPSKID',
        'TLSPSKFILE':r'c:\mykey.psk',
        'TLSCAFILE':r'c:\temp\f.txt1',
        'TLSCRLFILE':r'c:\temp\f.txt2',
        'TLSSERVERCERTISSUER':'"My CA"',
        'TLSSERVERCERTSUBJECT':'"My Cert"',
        'TLSCERTFILE':r'c:\temp\f.txt5',
        'TLSKEYFILE':r'c:\temp\f.txt6',
        'ENABLEPATH':'1',
        'INSTALLFOLDER':r'c:\toto.log',
        'SKIP':'fw'}
    install_msi_if_needed('zabbix_agent-4.2.4-win-amd64-openssl.msi', properties = properties,force=True)
We need to adapt now
User avatar
Gaetan
Messages: 169
Registration: August 8, 2019 - 10:16
Location: Toulouse

August 9, 2019 - 3:41 PM

Hello sfonteneau,

Thank you for your explanation, it works much better and I understood my mistakes.

Here's the code, in case it helps others:

Code: Select all

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

uninstallkey = []

properties = {
	'SERVERADDRESS':'10.31.8.47',
	'DONT_USE_ANSWER_FILE':1,
    	'EULA':1,
	'PRIVACYPOLICY':1,
    	'LAUNCHPROGRAM':1
	}

def install():

    print('installing tls-agent-kav-10-installer')
    if os.path.isdir('C:\Program Files (x86)\Kaspersky Lab\NetworkAgent') == False:
        install_msi_if_needed('Kaspersky Network Agent.msi', properties = properties )
    else:
        print ('Kaspersky Agent already installed')
Locked