I am trying to create a "universal" package for uninstalling applications that are not managed by WAPT.
To do this, I use waptmessage, following an example found here on the forum, to open a dialog box and choose the application to uninstall.
It works perfectly in dev mode but once sent to the server, the dialog box does not open and the installation times out.
Here is the part of the code that opens this dialog box:
Code: Select all
application = ""
# Choix par défaut liste déroulante
default_value = "--Choisir une option s'il vous plait--"
# Forlumaire pour rentrer le nom de l'application lors de l'installation
form =f"""\
<html encoding="utf8">
<form method="STDOUT">
<h4>Logiciel à désinstaller :</h4>
<label for="app-select">Choisir un logiciel :</label>
<select name="application" id="app-select">
<option value="">{default_value}</option>
<option value="ccleaner">CCleaner</option>
</select>
<input type="submit" value="Valider">
</form>
</html>
"""
def install():
s = base64.b64encode((form % locals()).encode('utf8'))
result = run(['waptmessage','-c','-b',s])
if result:
data = json.loads(result)
application = data['result']['application']
For your information:
- Installed WAPT version: 2.3.0.13.166(c)
- Operating system of the administration/package creation machine: Windows 10
