Block the installation of a package

Share your tips or issues concerning the WAPT Console or WAPT Agent here
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
Answer
Damien Touraine
Messages: 13
Registration: Nov 13, 2025 - 10:02

December 17, 2025 - 5:02 PM

Hello,
In what order are package installations evaluated on the machine?
We need to deploy a package to an OU, but some agents MUST NOT deploy it. So, if it evaluates the addition first and then the conflict, it might add the package and then remove it when it detects the conflict.

I was thinking of adding the package in question to the "conflicts" list of the affected computers. But are we sure the package will never install while it's in a conflict?
What happens if we install a new version of the package? Will the new version still be considered a conflict, or should we add the new version to the conflict list?

Sincerely,
Damien
User avatar
htouvet
WAPT Expert
Messages: 436
Registration: March 16, 2015 - 10:48
Contact :

December 18, 2025 - 09:08

There is no concept of "exception" when you put a dependency in place.
So if the package is placed as a dependency on the OU, all machines in that OU are expected to install it.

The safest way to prevent machines from installing the software or configuration is to put the rule in the setup.py / install code of the package itself with an "if" condition.
It is obviously necessary to be able to code the criterion (machine name? group membership? machine type?)

Code: Select all

from setuphelpers import *

exclusions = ['pc1','pc2','pc10']

def install():
    if not get_computername in exclusions:
        install_msi_if_needed('logiciel_install.msi')
Tranquil IT
Damien Touraine
Messages: 13
Registration: Nov 13, 2025 - 10:02

January 6, 2026 - 5:52 PM

Hello,
I don't have direct access to the package.
But I don't understand: if the package is marked as "conflict" on one machine and then deployed to an OU where that machine is located,
what happens?
Will it first install it on the machine and then uninstall it?
Sincerely,
Damien
User avatar
vcardon
WAPT Expert
Messages: 278
Registration: Oct 06, 2017 - 10:55 p.m.
Location: Nantes, France

January 7, 2026 - 7:15 PM

Hello, WAPT uninstalls conflicting packages (attributed to "conflicts") before installing dependent packages (attributed to "depends") of the machine package.

It needs testing, but it should work for your use case.
Vincent CARDON
Tranquil IT
Answer