Page 1 of 1

[SOLVED] Delete an application

Published: August 22, 2018 - 4:58 PM
by Gorenda
Hello,

I need to remove an application that wasn't deployed via WAPT.
The package has been created:
Inside, I have two functions:
- the first, `def install`, which is empty and does nothing.
- the second, `def uninstall`, to remove it.

When I run `execute` in PyScripter on the `uninstall` function, the software is removed.

In the WAPT console, I'd like to add the uninstallation package to a group. That way, as soon as I add a computer to the group, the software is removed from that computer.

I admit I don't know how to do this. I even tried putting it in the banned packages section, but that didn't work.

Has anyone managed to do this before?

Thanks in advance,
Best regards,
Gorenda

Re: Deleting an application

Published: August 23, 2018 - 11:00 AM
by agauvrit
Good morning,

There is a misunderstanding about how WAPT packages work
  • The code contained in the function
    def install()
    runs during the installation of the WAPT package
  • The code contained in the function
    def uninstall()
    runs during the uninstallation of the WAPT package
Therefore, you must describe the uninstallation of your software in the package's install function and leave the uninstall function blank

Re: Deleting an application

Published: August 23, 2018 - 3:06 PM
by Gorenda
Thanks for your feedback.


Okay, I also modified my source code and now it works.