[Wapt] installation silencieuse
Simon Fonteneau
sfonteneau at stemarie-aizenay.fr
Thu Jul 30 22:07:23 CEST 2015
Il te faut utiliser remove et pas uninstall
uninstall sert effectivement quand tu a déclaré un uninstall():
(quand une uninstall key ou string n'est pas dispo)
Pour la fenêtre, comme l'installation sera exécuter en compte system
normalement pas de soucis a mon avis, mais si vraiment tu veux faire
quelque chose tu peux rajouter ceci:
for browser in ('firefox.exe','iexplore.exe','chrome.exe'):
if isrunning(browser):
print ("closing %s" % browser)
killalltasks(browser)
Mais cela peux poser soucis si un utilisateur est connecté
Simon
Le 30 juillet 2015 16:02, Yohann Pla <Yohann.Pla at lemarsan.fr> a écrit :
> Salut Simon,
>
> oui effectivement j'ai récupérer un de tes scripts. ;)
>
> merci pour ton retour, le script modifié que tu m'as fournis fonctionne
> bien pour l'install dans le test sous pyscripter.
>
> Par contre a la fin de l'install cela m'ouvre une page web de l’éditeur du
> logiciel. Existe t il une commande à rajouter dans le script pour empêcher
> cela ?
>
> Aussi quand j’exécute le module uninstall cela ne désinstalle pas VSDC.
> Faut il rajouter un "def uninstall" ?
>
> merci
>
> Yohann
> ------------------------------
> *De :* Simon Fonteneau [sfonteneau at stemarie-aizenay.fr]
> *Envoyé :* mercredi 29 juillet 2015 23:13
> *À :* Yohann Pla
> *Cc :* wapt at lists.tranquil.it
> *Objet :* Re: [Wapt] installation silencieuse
>
> Salut
>
> Tu utilise mes script ;-)
>
> Pour plus d'info sur leur utilisations:
> http://wiki.lesfourmisduweb.org/index.php/Cr%C3%A9ation_paquet_wapt
>
>
> Ce que je fait c'est que je désinstalle l'ancienne version avant:
>
>
> Ceci doit fonctionner :
>
>
> # -*- coding: utf-8 -*-
> from setuphelpers import *
>
> uninstallkey = ['VSDC Free Video Editor_is1']
>
> def install():
>
> softname = 'VSDC Free Video Editor'
> versionsoft = '3.2.1.373'
>
> check_installed = installed_softwares(softname)
> # si cette liste globale n est pas vide, on check chaque logiciel
> if check_installed:
> # boucle pour chaque logiciel trouvée
> for uninstall in check_installed:
> if uninstall['version'] == versionsoft :
> print(u'The software is already installed' )
> return (0);
> if uninstall['version'] > versionsoft :
> print(u'The software is already installed and its
> version is newer than the version of the package' )
> return (0);
>
> #Recherche du Logiciel logiciel
> check_installed_soft = installed_softwares(softname)
> # si cette liste globale n est pas vide on remove chaque logiciel
> if check_installed_soft:
> # boucle pour chaque logiciel trouvee
> for uninstall in check_installed_soft:
> # Si la version est differente que la version du fichier
> controle:
> if uninstall['version'] < versionsoft:
> print(u'remove old software' )
> # Surpression grece a la a la uninstall string présente
> dans la uninstall key.
> cmd = WAPT.uninstall_cmd(uninstall['key'])
> run(cmd)
>
>
> print('installing smp-vsdcfreevideoeditor')
> run(r'"video_editor.exe" /VERYSILENT')
>
> check_installed_out = installed_softwares(softname)
> if check_installed_out:
> for uninstall in check_installed_out:
> if uninstall['version'] == versionsoft:
> print(u'The software installation was
> successful')
> return (0);
> for uninstall in check_installed_out:
> if uninstall['version'] > versionsoft:
> print(u'The software is already installed and its
> version is newer than the version of the package' )
> return (0);
> for uninstall in check_installed_out:
> if uninstall['version'] != versionsoft:
> error('The output verification has found a
> old version of software')
> error('End audit did not find the software.')
>
>
>
> Simon
>
> Le 29 juillet 2015 16:52, Yohann Pla <Yohann.Pla at lemarsan.fr> a écrit :
>
>> Bonjour,
>>
>>
>> je souhaite déployer VSDC free video editor (
>> http://www.videosoftdev.com/fr/free-video-editor) sur certains de mes
>> postes. j'ai donc créé le paquet et editer le setup.py
>>
>> je me suis inspiré d'un script qui fonctionne pour Gimp et je l'ai adapté
>> pour VSDC :
>>
>> import platform
>> from setuphelpers import *
>>
>> uninstallkey=['VSDC Free Video Editor_is1']
>>
>> def install():
>>
>> softname = 'VideoEditor'
>> versionsoft = '3.2.0.370-0'
>> check_installed = installed_softwares(softname)
>> # si cette liste globale n est pas vide, on check chaque logiciel
>> if check_installed:
>> # boucle pour chaque logiciel trouvée
>> for uninstall in check_installed:
>> if uninstall['version'] == versionsoft :
>> print(u'The software is already installed' )
>> return (0);
>> if uninstall['version'] > versionsoft :
>> print(u'The software is already installed and its
>> version is newer than the version of the package' )
>> return (0);
>>
>>
>> global uninstallkey
>> print("installing exe")
>> print run('video_editor.exe /SUPPRESSMSGBOXES /VERYSILENT /SP-')
>> return 0
>>
>> check_installed_out = installed_softwares(softname)
>> if check_installed_out:
>> for uninstall in check_installed_out:
>> if uninstall['version'] == versionsoft:
>> print(u'The software installation was
>> successful')
>> return (0);
>> for uninstall in check_installed_out:
>> if uninstall['version'] > versionsoft:
>> print(u'The software is already installed and its
>> version is newer than the version of the package' )
>> return (0);
>> for uninstall in check_installed_out:
>> if uninstall['version'] != versionsoft:
>> error('The output verification has found a
>> old version of software')
>> error('End audit did not find the software.')
>>
>>
>> je voudrais que cette installation soit complétement silencieuse.
>> Sauf qu'un problème survient car quand le programme vient verifier la
>> presence d'une version deja installé et qu'il en trouve une, une boite
>> de dialogue s'ouvre alors pour me demander si je veux désinstaller la version
>> existante.
>> Et ce meme avec les paramètres optionnels /SUPPRESSMSGBOXES
>> /VERYSILENT.
>> je ne vois pas comment supprimer cette boite de dialogue .
>> le reste de l'installation se passe sans problème qu'on est répondu oui
>> ou non a la question.
>> La désinstallation par wapt ne fonctionne pas du tout.
>>
>> merci pour l'aide
>>
>> Yohann
>> [image: Le Marsan Agglomération] Yohann Pla
>> Animateur multimédia Yohann.Pla at lemarsan.fr
>> -
>> Le Marsan Agglomération
>> 575, avenue du Maréchal FOCH - BP 70171 - 40003 Mont de Marsan cedex
>>
>> _______________________________________________
>> WAPT mailing list
>> WAPT at lists.tranquil.it
>> http://lists.tranquil.it/listinfo/wapt
>>
>>
>
>
> --
>
>
--
-------------- section suivante --------------
Une pi�ce jointe HTML a �t� nettoy�e...
URL: <http://lists.tranquil.it/pipermail/wapt/attachments/20150730/e78e7a9c/attachment-0001.html>
More information about the WAPT
mailing list