<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Salut Simon,<br>
<br>
oui effectivement j'ai récupérer un de tes scripts. ;)<br>
<br>
merci pour ton retour, le script modifié que tu m'as fournis fonctionne bien pour l'install dans le test sous pyscripter.<br>
 <br>
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 ?<br>
<br>
Aussi quand j’exécute le module uninstall cela ne désinstalle pas VSDC. Faut il rajouter un "def uninstall" ?<br>
<br>
merci<br>
<br>
Yohann<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF844544"><font face="Tahoma" color="#000000" size="2"><b>De :</b> Simon Fonteneau [sfonteneau@stemarie-aizenay.fr]<br>
<b>Envoyé :</b> mercredi 29 juillet 2015 23:13<br>
<b>À :</b> Yohann Pla<br>
<b>Cc :</b> wapt@lists.tranquil.it<br>
<b>Objet :</b> Re: [Wapt] installation silencieuse<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">
<div dir="ltr" style="font-size:12.8000001907349px">Salut
<div><br>
</div>
<div>Tu utilise mes script ;-)</div>
<div><br>
</div>
<div>Pour plus d'info sur leur utilisations:</div>
<div><a href="http://wiki.lesfourmisduweb.org/index.php/Cr%C3%A9ation_paquet_wapt" target="_blank">http://wiki.lesfourmisduweb.org/index.php/Cr%C3%A9ation_paquet_wapt</a><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Ce que je fait c'est que je désinstalle l'ancienne version avant:</div>
<div><br>
</div>
<div><br>
</div>
<div>Ceci doit fonctionner : </div>
<div><br>
</div>
<div><br>
</div>
<div>
<div># -*- coding: utf-8 -*-</div>
<div>from setuphelpers import *</div>
<div><br>
</div>
<div>uninstallkey = ['<span style="color:rgb(153,51,0); font-family:Tahoma; font-size:13.3333330154419px">VSDC Free Video Editor_is1'</span>]</div>
<div><br>
</div>
<div>def install():</div>
<div><br>
</div>
<div>      softname = 'VSDC Free Video Editor'</div>
<div>      versionsoft = '3.2.1.373'</div>
<span class="im">
<div><br>
</div>
<div>      check_installed = installed_softwares(softname)</div>
<div>      # si cette liste globale n est pas vide, on check chaque logiciel</div>
<div>      if check_installed:</div>
</span>
<div>            # boucle pour chaque logiciel trouvée</div>
<span class="im">
<div>            for uninstall in check_installed:</div>
<div>                  if uninstall['version'] == versionsoft :</div>
<div>                        print(u'The software is already installed' )</div>
<div>                        return (0);</div>
<div>                  if uninstall['version'] > versionsoft :</div>
<div>                        print(u'The software is already installed and its version is newer than the version of the package' )</div>
<div>                        return (0);</div>
<div><br>
</div>
</span>
<div>      #Recherche du Logiciel logiciel</div>
<div>      check_installed_soft = installed_softwares(softname)</div>
<div>      # si cette liste globale n est pas vide on remove chaque logiciel</div>
<div>      if check_installed_soft:</div>
<div>          # boucle pour chaque logiciel trouvee</div>
<div>             for uninstall in check_installed_soft:</div>
<div>                # Si la version est differente que la version du fichier controle:</div>
<div>                if uninstall['version'] < versionsoft:</div>
<div>                   print(u'remove old software' )</div>
<div>                   # Surpression grece a la a la uninstall string présente dans la uninstall key.</div>
<div>                   cmd = WAPT.uninstall_cmd(uninstall['key'])</div>
<div>                   run(cmd)</div>
<div><br>
</div>
<div><br>
</div>
<div>      print('installing smp-vsdcfreevideoeditor')</div>
<div>      run(r'"video_editor.exe" /VERYSILENT')</div>
<span class="im">
<div><br>
</div>
<div>      check_installed_out = installed_softwares(softname)</div>
<div>      if check_installed_out:</div>
<div>          for uninstall in check_installed_out:</div>
<div>                     if uninstall['version'] == versionsoft:</div>
<div>                               print(u'The software installation was successful')</div>
<div>                               return (0);</div>
<div>          for uninstall in check_installed_out:</div>
<div>                     if uninstall['version'] > versionsoft:</div>
<div>                        print(u'The software is already installed and its version is newer than the version of the package' )</div>
<div>                        return (0);</div>
<div>          for uninstall in check_installed_out:</div>
<div>                     if uninstall['version'] != versionsoft:</div>
<div>                               error('The output verification has found a old version of software')</div>
<div>      error('End audit did not find the software.')</div>
</span></div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Simon</div>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">Le 29 juillet 2015 16:52, Yohann Pla <span dir="ltr"><<a href="mailto:Yohann.Pla@lemarsan.fr" target="_blank">Yohann.Pla@lemarsan.fr</a>></span> a écrit :<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">Bonjour,
<br>
<br>
<br>
je souhaite déployer VSDC free video editor (<a href="http://www.videosoftdev.com/fr/free-video-editor" target="_blank">http://www.videosoftdev.com/fr/free-video-editor</a>) sur certains de mes postes. j'ai donc créé le paquet et editer le setup.py<br>
<br>
je me suis inspiré d'un script qui fonctionne pour Gimp et je l'ai adapté pour VSDC :<br>
<br>
<font color="993300">import platform<br>
from setuphelpers import *<br>
<br>
uninstallkey=['VSDC Free Video Editor_is1']<br>
<br>
def install():<br>
<br>
   softname = 'VideoEditor'<br>
   versionsoft = '3.2.0.370-0'<br>
   check_installed = installed_softwares(softname)<br>
   # si cette liste globale n est pas vide, on check chaque logiciel<br>
   if check_installed:<br>
            # boucle pour chaque logiciel trouvée<br>
            for uninstall in check_installed:<br>
                  if uninstall['version'] == versionsoft :<br>
                        print(u'The software is already installed' )<br>
                        return (0);<br>
                  if uninstall['version'] > versionsoft :<br>
                        print(u'The software is already installed and its version is newer than the version of the package' )<br>
                        return (0);<br>
<br>
<br>
   global uninstallkey<br>
   print("installing exe")<br>
   print run('video_editor.exe /SUPPRESSMSGBOXES /VERYSILENT /SP-')<br>
   return 0<br>
<br>
   check_installed_out = installed_softwares(softname)<br>
   if check_installed_out:<br>
          for uninstall in check_installed_out:<br>
                     if uninstall['version'] == versionsoft:<br>
                               print(u'The software installation was successful')<br>
                               return (0);<br>
          for uninstall in check_installed_out:<br>
                     if uninstall['version'] > versionsoft:<br>
                        print(u'The software is already installed and its version is newer than the version of the package' )<br>
                        return (0);<br>
          for uninstall in check_installed_out:<br>
                     if uninstall['version'] != versionsoft:<br>
                               error('The output verification has found a old version of software')<br>
   error('End audit did not find the software.')<br>
<br>
<br>
</font><font color="000000"><font color="000000">je <font color="000000"><font color="000000">voudrais</font> que cette installation soit
<font color="000000">complétement</font> silencieuse. <br>
Sauf qu'</font>un <font color="000000">problème</font> sur<font color="000000">vient car quand le programme vien<font color="000000">t verifier la presence d'une version deja installé et qu'il en trouve une<font color="000000">, un<font color="000000">e boite
 de dialogue s'ouvre alors pour me demander si je veux <font color="000000">désinstaller</font> la v<font color="000000">ersion existante.<font color="000000"><br>
 </font></font></font></font><font color="000000">Et ce <font color="000000">meme avec</font></font></font></font></font> les<font color="000000">
<font color="000000">paramètres <font color="000000">optionnels </font> /SUPPRESSMSGBOXES /VERYSILENT.
<br>
je ne vois pas comment supprimer cette boite de dialo<font color="000000">gue .<br>
<font color="000000">le reste de l'installation se passe sans <font color="000000">
problème</font> qu'on est <font color="000000">répondu</font> oui ou non a la question.<br>
<font color="000000">L<font color="000000">a <font color="000000">désinstallation</font> par wapt ne fonctionne pas du tout.<br>
<br>
<font color="000000">merci pour l<font color="000000">'aide<br>
<br>
<font color="000000">Yohann</font><br>
</font></font></font></font></font></font></font></font></font></div>
<u></u>
<table height="100" cellspacing="0">
<tbody>
<tr>
<td rowspan="2" valign="middle"><a><img alt="Le Marsan
                Agglomération" src="http://www.lemarsan.fr/logo_lemarsan.png" height="82" border="0" width="175"></a></td>
<td valign="middle"><span style="font-style:italic; font-weight:bold">Yohann Pla</span><br>
<span>Animateur multimédia</span> </td>
</tr>
<tr>
<td valign="middle"><a href="mailto:Yohann.Pla@lemarsan.fr" target="_blank">Yohann.Pla@lemarsan.fr</a><br>
- <br>
Le Marsan Agglomération<br>
575, avenue du Maréchal FOCH - BP 70171 - 40003 Mont de Marsan cedex </td>
</tr>
</tbody>
</table>
</div>
<br>
_______________________________________________<br>
WAPT mailing list<br>
<a href="mailto:WAPT@lists.tranquil.it" target="_blank">WAPT@lists.tranquil.it</a><br>
<a href="http://lists.tranquil.it/listinfo/wapt" rel="noreferrer" target="_blank">http://lists.tranquil.it/listinfo/wapt</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="gmail_signature">
<div dir="ltr"><img src="http://intranet.stemarie-aizenay.fr/signature_simon.jpg"><br>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>