Cleaning, or how to regain control of your fleet.

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
kukrapoc
Messages: 4
Registration: March 30, 2016 - 09:00

March 31, 2016 - 2:30 PM

Hello,

I'm currently testing the very promising Wapt.
I'm taking over a network of approximately 400 machines (XP, Win7 32 & 64) and would like to know the best method for "cleaning up" the workstations before properly deploying the same software version via Wapt. A

concrete example on one machine: Deployment via GPO of the agent, no problem. Then, testing the installation of the tis-java8 package, no problem. However, the old Java version already installed (7) is still there. :(

Before preparing a company-wide rollout, I would like to master the uninstallation of the software already installed on the workstations in order to return to the most standardized and homogeneous network possible.
I hope I have been clear about my request.

I'll continue to inquire.

Thank you and have a good day everyone. ;)
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

April 1, 2016 - 9:10 AM

Hello kukrapoc

For "well-made" software, you can use the uninstallkey to uninstall the software beforehand.

Example:

Code: Select all

      softname = 'Scribus'
      versionsoft = '15.007.20033'
      check_installed_soft = installed_softwares(softname)
      if check_installed_soft:
             for uninstall in check_installed_soft:
                if Version(uninstall['version']) < Version(versionsoft):
                   cmd = WAPT.uninstall_cmd(uninstall['key'])
                   run(cmd)
I do indeed do this with the packages on my repository, and especially with Java:

It is available here
https://wapt.lesfourmisduweb.org/wapt/s ... 2_all.wapt

Simon
kukrapoc
Messages: 4
Registration: March 30, 2016 - 09:00

April 1, 2016 - 4:16 PM

Hello and thank you for your reply.

If I understand correctly, I need to create a .bat file containing my uninstall code and then create a package with it?

Sorry if I'm a novice, but I've just started using this software and it's not very clear yet...

Thanks anyway. ;)
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

April 2, 2016 - 5:15 PM

Hello, no, you can add it to the beginning of your package's setup.py file.

Here are some documentation resources for creating packages:

- http://dev.tranquil.it/scenari/guide_cr ... _wapt.html
- https://wiki.lesfourmisduweb.org/index. ... aquet_wapt
- http://reseaux85.fr/index.php?title=Cr% ... quets_WAPT
kukrapoc
Messages: 4
Registration: March 30, 2016 - 09:00

April 6, 2016 - 2:16 PM

Thank you for your reply.

However, what about software that we want to permanently uninstall?

Is it possible to create a package that uninstalls only one (or more) program(s)?

Thank you and have a good day. ;)
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

April 6, 2016 - 3:51 PM

Good morning

You can create a package named "tis-uninstallsoft"

And include inside.

Code: Select all

def install() :
      softname = 'Scribus'
      check_installed_soft = installed_softwares(softname)
      if check_installed_soft:
             for uninstall in check_installed_soft:
                   cmd = WAPT.uninstall_cmd(uninstall['key'])
                   run(cmd)
                   
      softname = 'inkscape'
      check_installed_soft = installed_softwares(softname)
      if check_installed_soft:
             for uninstall in check_installed_soft:
                   cmd = WAPT.uninstall_cmd(uninstall['key'])
                   run(cmd)          
!! Warning However !!The script doesn't go into detail. It will remove all software that contains the words "Scribus" and "Inkscape".

Also, be careful!
Uninstallation will only work if the software's uninstall key is silent.
Indeed, if the software's uninstall key is not silent, it will not work, waiting indefinitely for user action.
kukrapoc
Messages: 4
Registration: March 30, 2016 - 09:00

April 7, 2016 - 6:13 PM

Thank you so much for taking the time to reply.

I'll try all of that out.

See you soon! ;)
so37
Messages: 23
Registration: Apr 10, 2016 - 1:43 p.m.

May 2, 2016 - 10:33 PM

Hello Sfonteneau, thank you for the information you provided. You mentioned that it won't work for uninstalls using a non-silent uninstallkey. Can we replace cmd with msiexec /x xxxx.msi?
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

May 3, 2016 - 08:59

Yes, in the example, cmd represents the command line to be launched, and we will look for the one from uninstallkey

Code: Select all

cmd = WAPT.uninstall_cmd(uninstall['key'])
If it's not silent, this can easily be replaced by a hard-mounted control
Locked