KB No. 03: Deploying the mail agent via WAPT
In this article, you will find detailed instructions on how to deploy the Mail Agent via WAPT.
Background
WAPT is a sovereign IT asset management solution developed by Tranquil IT and certified by ANSSI. More info here.
Deployment with WAPT allows you to deploy the Workstation Agent on your employees' workstations. This deployment method is very useful when the WAPT agent is installed on workstations that you control.
Prerequisites
You must have control over your IT infrastructure, WAPT must be functional, and the WAPT agent must be deployed on workstations.
Procedure
- Download the .msi file for the Mail Agent in Olfeo SaaS (Configuration > Directories :

- Generate a packet template in WAPT by clicking on "Packet Template":

- Add the .msi file for the Mail Agent and then click "Continue":

- The package creation wizard will display the following information:

- Click "Edit manually" to edit the setup.py file, which by default contains the following lines:
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
def install():
# Declaring local variables
# Installing the software
print("Installing: authentication_agent_en.msi")
install_msi_if_needed('authentication_agent_en.msi')
TipBelowisan example of a functional setup.py file. We strongly recommend that you follow WAPT's recommendations/instructions by clicking here.
# -*- coding: utf-8 -*-
from setuphelpers import *
uninstallkey = []
properties = {
'CONFIG_URL':'https://storage.gra.cloud.ovh.net/v1/AUTH_XXXXX/prod-pub/XXXXXX/config.json',
}
def install():
print('installing olf-trustlane-agent')
install_msi_if_needed('authentication_agent_fr.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
print('RAZ configuration proxy')
run(r'reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" /f /v "DefaultConnectionSettings" /t REG_BINARY /d "4600000002000000090000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"')
run(r'reg add "HKEY_LOCAL_MACHINE\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" /f /v "DefaultConnectionSettings" /t REG_BINARY /d "4600000002000000090000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"')
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
def update_package():
pass
# put here what to do to update package content with newer installers.
# launched with command wapt-get update-package-sources <path-to-wapt-directory>
# implicit context variables are WAPT, basedir, control, user, params, run
# if attributes in control are changed, they should be explicitly saved to package file with control.save_control_to_wapt()
def audit():
pass
# put here code to check periodically that state is matching expectations
# return "OK", "WARNING" or "ERROR" to report status in console.
# all print statement are reported too
return "OK"- The value of "CONFIG_URL" corresponds to the configuration URL of the Mail Agent, which you will find in your Olfeo SaaS interface (Configuration > Directories (see directory) > tab Postal worker):

- Import the new package by clicking on "Build and import a package into the repository" and then select the folder containing the package, which is located by default in "C:\waptdev."

- The "Import" button allows you to import the package, which you will then find in the list of packages in the "Private Repository" menu:

- You can deploy the Agent on a workstation.

Caution
In some cases, the Agent systray may not start after installation in this deployment mode (desktop and user rights used by the "WAPT" user where the systray requires admin space). To avoid these side effects, plan to restart the workstation after installing the Agent.
Tags: Deploy, Agent, UC-03