Bonjour,
Question comment modifier ce script afin de désinstaller correctement ce logiciel QGIS,
sachant qu'il n'existe qu'une clé de désinstallation de type "Uninstallstring"
Il me manque la compréhension globale du "système WAPT" dans la manière de...
Merci
#!/usr/bin/python # -*- coding: utf-8 -*-
import platform from setuphelpers import *
required_params = []
uninstallkey=['']
def install(): global uninstallkey print "arret de QGIS" killalltasks('qgis-bin.exe') # liste des logiciels nommes QGIS old_qgis = installed_softwares('QGIS') # si cette liste globale n est pas vide, on desinstalle explicitement chaque logiciel if old_qgis: # boucle pour chaque logiciel trouve for uninstall in old_qgis: # on recupere la commande de desinstallation correspondant a la cle du logiciel cmd = WAPT.uninstall_cmd(uninstall['key']) print(u'uninstalling %s' % (uninstall['name'],)) # on execute la commande de desinstallation run(cmd)
if iswin64(): print "installation de QGIS version 64 bits" uninstallstring = ['"C:Program FilesQGIS ValmieraUninstall-QGIS.exe" /S'] run('QGIS-OSGeo4W-2.2.0-1-Setup-x86_64 /S') else: print "installation de QGIS version 32 bits" uninstallstring = ['"C:Program Files (x86)QGIS ValmieraUninstall-QGIS.exe" /S'] run('QGIS-OSGeo4W-2.2.0-1-Setup-x86 /S')
---------------------------------------------------------------------- Merci de nous aider à préserver l'environnement en n'imprimant ce courriel et les documents joints que si nécessaire.