Page 1 of 1

Cleaning, or how to regain control of your fleet.

Published: March 31, 2016 - 2:30 PM
by kukrapoc
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. ;)

Re: Cleaning or how to regain control of your park.

Published: April 1, 2016 - 9:10 AM
by sfonteneau
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

Re: Cleaning or how to regain control of your park.

Published: April 1, 2016 - 4:16 PM
by kukrapoc
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. ;)

Re: Cleaning or how to regain control of your park.

Published: April 2, 2016 - 5:15 PM
by sfonteneau
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

Re: Cleaning or how to regain control of your park.

Published: April 6, 2016 - 2:16 PM
by kukrapoc
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. ;)

Re: Cleaning or how to regain control of your park.

Published: April 6, 2016 - 3:51 PM
by sfonteneau
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.

Re: Cleaning or how to regain control of your park.

Published: April 7, 2016 - 6:13 PM
by kukrapoc
Thank you so much for taking the time to reply.

I'll try all of that out.

See you soon! ;)

Re: Cleaning or how to regain control of your park.

Published: May 2, 2016 - 10:33 PM
by so37
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?

Re: Cleaning or how to regain control of your park.

Published: May 3, 2016 - 8:59 AM
by sfonteneau
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