Bonjour,
Je cherche à créer un paquet propre pour le logiciel schemaplic avec une installation et une désinstallation. L'installation se passe sans trop de douleur avec un fichier de réponse iss. Par contre pour ce qui est de la désinstallation cela me résiste.
Je m'explique :
La désinstallation en ligne de commande marche (avec un fichier de désinstallation également !!), voici la ligne : "C:\Program Files (x86)\InstallShield Installation Information{3A86707D-6603-403C-B84E-AFC1EE9C080F}\setup.exe" -runfromtemp -10x040c -removeonly -s -f1C:\temp\uninstall.iss
Et lorsque je retranscrit cette ligne dans le script python cela ne marche plus. Voici ce que j'ai écrit :
def uninstall(): print(u'Désinstallation de liv-schemaplic') run('"%s" -runfromtemp -10x040c -removeonly -s -f1.\uninstall.iss' % (makepath(programfiles32,'InstallShield Installation Information{3A86707D-6603-403C-B84E-AFC1EE9C080F}','setup.exe')))
Je met -f1.\uninstall.iss car j'ai copier le fichier dans le paquet wapt et cela marche pour l'installation.
Ne trouvant pas ou je cafouille je me tourne vers vous afin de solutionner mon soucis. @+ et bonjour à l'équipe !!
Le 05/03/2015 14:57, David MONTAIGNE a écrit :
Bonjour,
Je cherche à créer un paquet propre pour le logiciel schemaplic avec une installation et une désinstallation. L'installation se passe sans trop de douleur avec un fichier de réponse iss. Par contre pour ce qui est de la désinstallation cela me résiste.
Je m'explique :
La désinstallation en ligne de commande marche (avec un fichier de désinstallation également !!), voici la ligne : "C:\Program Files (x86)\InstallShield Installation Information{3A86707D-6603-403C-B84E-AFC1EE9C080F}\setup.exe" -runfromtemp -10x040c -removeonly -s -f1C:\temp\uninstall.iss
Et lorsque je retranscrit cette ligne dans le script python cela ne marche plus. Voici ce que j'ai écrit :
def uninstall(): print(u'Désinstallation de liv-schemaplic') run('"%s" -runfromtemp -10x040c -removeonly -s -f1.\uninstall.iss' % (makepath(programfiles32,'InstallShield Installation Information{3A86707D-6603-403C-B84E-AFC1EE9C080F}','setup.exe')))
attention aux backslahes dans les chaines de caractères python qui sont interprétées. mettre un "r" devant la chaine.
Ensuite, à la désinstallation, le paquet n'est plus disponible en tant que tel, seul le contenu du setup.py est sauvegardé (dans la base locale de wapt) pour être appelable à la désinstallation. Lors de l'installation, le paquet est dézippé dans un répertoire temporaire qui est supprimé ensuite. Donc si des fichiers supplémentaires sont requis à la phase de désinstallation, il faut les mettre à un endroit connu pendant l'installation pour les retrouver à la désinstallation. Dans ton cas, le fichier uninstall.iss est sûrement indisponible
à l'installation : def install(): ... # sauvegarde fichier iss pour uninstall filecopyto('uninstall.iss', makepath(programfiles32,'InstallShield Installation Information','{3A86707D-6603-403C-B84E-AFC1EE9C080F}','uninstall.iss')) ...
def uninstall(): print(u'Désinstallation de liv-schemaplic') run('"%s" -runfromtemp -10x040c -removeonly -s -f1"%s"' % ( makepath(programfiles32,'InstallShield Installation Information','{3A86707D-6603-403C-B84E-AFC1EE9C080F}','setup.exe'),makepath(programfiles32,'InstallShield Installation Information','{3A86707D-6603-403C-B84E-AFC1EE9C080F}','uninstall.iss') ))
Hubert
Je met -f1.\uninstall.iss car j'ai copier le fichier dans le paquet wapt et cela marche pour l'installation.
Ne trouvant pas ou je cafouille je me tourne vers vous afin de solutionner mon soucis. @+ et bonjour à l'équipe !! _______________________________________________ WAPT mailing list WAPT@lists.tranquil.it http://lists.tranquil.it/listinfo/wapt
Bonjour David,
Je cherche à créer un paquet propre pour le logiciel schemaplic avec une installation et une désinstallation. L'installation se passe sans trop de douleur avec un fichier de réponse iss. Par contre pour ce qui est de la désinstallation cela me résiste.
Je m'explique :
La désinstallation en ligne de commande marche (avec un fichier de désinstallation également !!), voici la ligne : "C:\Program Files (x86)\InstallShield Installation Information{3A86707D-6603-403C-B84E-AFC1EE9C080F}\setup.exe" -runfromtemp -10x040c -removeonly -s -f1C:\temp\uninstall.iss
Et lorsque je retranscrit cette ligne dans le script python cela ne marche plus. Voici ce que j'ai écrit :
def uninstall(): print(u'Désinstallation de liv-schemaplic') run('"%s" -runfromtemp -10x040c -removeonly -s -f1.\uninstall.iss' % (makepath(programfiles32,'InstallShield Installation Information{3A86707D-6603-403C-B84E-AFC1EE9C080F}','setup.exe')))
Je met -f1.\uninstall.iss car j'ai copier le fichier dans le paquet wapt et cela marche pour l'installation.
Ne trouvant pas ou je cafouille je me tourne vers vous afin de solutionner mon soucis.
Au moment de la désinstallation, le contenu du paquet WAPT n'est plus disponible (sinon ça consommerait trop d'espace disque). La fonction de désinstallation "def uninstall():" est stocké dans la base locale sqlite avec le contenu du fichier de contrôle, mais les fichiers qui était présent dans le zip ne sont plus disponible.
Pour que le uninstall.iss soit dispo au moment de la désinstallation, il faudrait le copier au moment de l'installation à un endroit fixe, du genre le répertoire d'installation de l'application, et passer le chemin lors de la désinstallation.
à bientôt,
Denis
@+ et bonjour à l'équipe !! _______________________________________________ WAPT mailing list WAPT@lists.tranquil.it http://lists.tranquil.it/listinfo/wapt