I already have a lot of software installed on my machines that Wapt offers.
However, Wapt doesn't offer to update them.
So here's something I'd like to know: how do I integrate the software that's already installed?
Thanks for your help, and Happy New Year 111110000 to all.
How to install software that is already installed?
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
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
It all depends on your Python script. If you just install it, it will reinstall over the existing software even if it's already present.
You can add a condition so that if it's already present, it doesn't reinstall.
You can also play around with the version...
You can add a condition so that if it's already present, it doesn't reinstall.
You can also play around with the version...
Indeed, well-written packages test the already installed version and only perform post-configuration if the software is already present on the machine (functions install_exe_if_needed or install_msi_if_needed for example)
If the fleet is homogeneous (the PCs all have roughly the same software), then a group software package applied to all PCs will do the job.
Alternatively, one solution is to create a package that detects the software present and installs the corresponding WAPT package.
Then, updates are done via Wapt.
Example of a corresponding setup.py script:
If the fleet is homogeneous (the PCs all have roughly the same software), then a group software package applied to all PCs will do the job.
Alternatively, one solution is to create a package that detects the software present and installs the corresponding WAPT package.
Then, updates are done via Wapt.
Example of a corresponding setup.py script:
Code: Select all
# -*- coding: utf-8 -*-
from setuphelpers import *
uninstallkey = []
softs = (
('adobe flash','tis-flash'),
('java update','tis-java'),
('irfanview','tis-irfanview'),
('7-zip','tis-7zip'),
('notepad++','tis-notepadplusplus'),
('mozilla firefox esr','tis-firefox-esr'),
)
def update_control(control):
import re
# replace description with list of keywords
control.description = re.sub('\(.*\)','(%s)'%(','.join([s for s,p in softs])),control.description)
def install():
for (keywords,package) in softs:
found = installed_softwares(keywords)
if found and not WAPT.is_installed(package):
print('%s %s installed, adding package'%(found[0]['name'],found[0]['version']))
WAPT.install(package)
Tranquil IT
Good morning,
A slightly off-topic question.
Does this printout correctly return the package name and version?
A slightly off-topic question.
Does this printout correctly return the package name and version?
Code: Select all
print('%s %s installed, adding package'%(found[0]['name'],found[0]['version']))
WAPT.install(package)not quite
displays the first software name found in the Windows registry that matches the keywords, not Wapt packages.
By the way, there's an indentation problem in my previous post.
It is :
Code: Select all
print('%s %s installed, adding package'%(found[0]['name'],found[0]['version']))
WAPT.install(package)By the way, there's an indentation problem in my previous post.
It is :
Code: Select all
# -*- coding: utf-8 -*-
from setuphelpers import *
uninstallkey = []
softs = (
('adobe flash','tis-flash'),
('java update','tis-java'),
('irfanview','tis-irfanview'),
('7-zip','tis-7zip'),
('notepad++','tis-notepadplusplus'),
('mozilla firefox esr','tis-firefox-esr'),
)
def update_control(control):
import re
# replace description with list of keywords
control.description = re.sub('\(.*\)','(%s)'%(','.join([s for s,p in softs])),control.description)
def install():
for (keywords,package) in softs:
found = installed_softwares(keywords)
if found and not WAPT.is_installed(package):
print('%s %s installed, adding package'%(found[0]['name'],found[0]['version']))
WAPT.install(package)
Tranquil IT
