Have you ever managed to create a package to install Anagene 2 Plus? I tried installing the MSI with `install_msi_if_needed(ur'./Anagene/Anagene 2.msi')`, but I get the following error:
CalledProcessErrorOutput: Command 'msiexec /norestart /q /i "./Anagene/Anagene 2.msi" ' returned non-zero exit status 1619.
Output:I cannot open this package kagedinstallation. Check that it exists and that you are authorized to access it, or check with your application vendor that this Windows Installer package is valid.
and using setup.exe with install_exe_if_needed("setup.exe",'/VERYSILENT',key='{6E83FF05-B414-4AA8-A782-927CB7D516EC}',min_version='5.0.349.0'), I get the error:
EWaptSetupException: Fatal error: setup exe file setup.exe not found in package
However, the following command works normally when run manually in Windows:
Code: Select all
msiexec /norestart /q /i "C:\waptdev\dst-anagene2_2.0.0-17_all\Anagene\Anagene 2.msi""
Code: Select all
# -*- coding: utf-8 -*-
from setuphelpers import *
uninstallkey = ['{6E83FF05-B414-4AA8-A782-927CB7D516EC}']
global destdir
destdir = makepath(programfiles32,'Anagene2','Anagene2Plus_maj_2017')
def install():
print('Installation de Anagene2 PLUS avec MAJ 2017')
#install_exe_if_needed("setup.exe",'/VERYSILENT',key='{6E83FF05-B414-4AA8-A782-927CB7D516EC}',min_version='5.0.349.0')
install_msi_if_needed(ur'./Anagene/Anagene 2.msi')
remove_desktop_shortcut(r'Anagene2')
if not isdir(destdir):
mkdirs(destdir)
copytree2(r'.\Anagene2Plus_maj_2017',destdir)
print('Raccourci dans dossier Logiciels sur bureau public')
if not isdir(makepath(common_desktop(),u'Logiciels',u'SVT')):
mkdirs(makepath(common_desktop(),u'Logiciels',u'SVT'))
create_shortcut(makepath(common_desktop(),u'Logiciels',u'SVT',u'Anagene2.lnk'),target=r'%s\Anagene2\Anagene2Plus_maj_2017\anagene2.exe' %programfiles32, wDir=r'%s\Anagene2\Anagene2Plus_maj_2017\\' %programfiles32,icon=r'%s\Anagene2\Anagene2Plus_maj_2017\anagene2.exe' %programfiles32)
print('Raccourci dans dossier Logiciels SVT sur bureau EXAO')
if isdir(makepath(common_desktop(),u'Logiciels SVT')):
if not isdir(makepath(common_desktop(),u'Logiciels SVT',u'Génétique')):
mkdirs(makepath(common_desktop(),u'Logiciels SVT',u'Génétique'))
create_shortcut(makepath(common_desktop(),u'Logiciels SVT',u'Génétique',u'Anagene2.lnk'),target=r'%s\Anagene2\Anagene2Plus_maj_2017\anagene2.exe' %programfiles32, wDir=r'%s\Anagene2\Anagene2Plus_maj_2017\\' %programfiles32,icon=r'%s\Anagene2\Anagene2Plus_maj_2017\anagene2.exe' %programfiles32)
def uninstall():
print('Desinstallation de dst-anagene2')
if isfile(makepath(common_desktop(),u'Logiciels',u'SVT',u'Anagene2.lnk')):
remove_file(makepath(common_desktop(),'Logiciels','SVT','Anagene2.lnk'))
if isfile(makepath(common_desktop(),u'Logiciels SVT',u'Génétique',u'Anagene2.lnk')):
remove_file(makepath(common_desktop(),u'Logiciels SVT',u'Génétique',u'Anagene2.lnk'))