[SOLVED] Edt Package v2022 build 0.3.0 / Pronote v2022 build 0.3.0

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
stephane2b
Messages: 4
Registration: March 24, 2017 - 11:07

October 10, 2018 - 11:18

To contribute to this post, here's my package, still in testing. I don't understand anything about Python or programming in general.

Code: Select all

# -*- coding: utf-8 -*-
import setuphelpers
from setuphelpers import *
import os
#import time

year = '2018'       # à changer chaque année

#test du système pour chemin valide
if iswin64():
    #version 2018
    uninstallkey = "{26BC6156-3E08-4D06-89BD-A39711861AAA}"
    installsheildpath = 'c:\\program files (x86)\\InstallShield Installation Information'
    archi = 'x64'
else:
    uninstallkey = "{0BBE1447-6994-406D-B62B-D01A3DE0F2E7}"
    installsheildpath = 'c:\\program files\\InstallShield Installation Information'
    archi = 'x86'

try:
    os.stat('c:\\ematt')
except:
    os.mkdir('c:\\ematt')

try:
    os.stat('c:\\ematt\\pronote')
except:
    os.mkdir('c:\\ematt\\pronote')

try:
    os.stat('c:\\ematt\\pronote\\'+year+'')
except:
    os.mkdir('c:\\ematt\\pronote\\'+year+'')

unattend_install = 'c:\\ematt\\pronote\\'+year+'\\pronote_unattend_install.iss'
#print(installsheildpath) #control

#Lister les différents produit installés et les désinstaller
# p['key'] variable contenant la clef d'identification des versions         !créer les fichiers dans un repertoire temporaire!
def uninstall():
    pronoteinstall = setuphelpers.installed_softwares('pronote') #identique à wapt-get list-registry pronote

    #print(pronoteinstall) ##control

    ## à implémenter une condition pour savoir si la variable précédente est non nul, dans le cas contraire il faut sauter la boucle!!!!
    if len(pronoteinstall) != 0: ##-----> connais pas en python????

        for p in pronoteinstall:
            unattend_uninstall = ("c:\\ematt\\pronote\\"+year+"\\"+"Uninstall_pronote_"+p['key']+".iss") #stocke un chemin pour un fichier réponse prore à une version

            #print(unattend_uninstall) # control
            #test = 'Uninstall_pronote_'+p['key']+'.iss' # control
            #print(p['key']) #control
            #print(test) #control

            #Création du fichier réponse à la volée
            file = open(unattend_uninstall,'w')
            file.write("[InstallShield Silent]"'\n')
            file.write("Version=v7.00"'\n')
            file.write("File=Response File"'\n')
            file.write("OverwrittenReadOnly=NoToAll"'\n')
            file.write("["+p['key']+"-DlgOrder]"'\n')
            file.write("Dlg0="+p['key']+"-MessageBox-0"'\n')
            file.write("Count=2"'\n')
            file.write("Dlg1="+p['key']+"-SdFinishReboot-0"'\n')
            file.write("["+p['key']+"-MessageBox-0]"'\n')
            file.write("Result=6"'\n')
            file.write("["+p['key']+"-SdFinishReboot-0]"'\n')
            file.write("Result=1"'\n')
            file.write("BootOption=0")
            file.close()

            #lancer la désinstallation
            #print('"'+installsheildpath+'\\'+p['key']+'\\setup.exe" -s -uninst -f1'+unattend_uninstall) #control
            #time.sleep(300) ## pause pour controle
            print('Desinstallation de '+p['name'])
            os.system('"'+installsheildpath+'\\'+p['key']+'\\setup.exe" -s -uninst -f1'+unattend_uninstall)

        print('toutes les installations ont ete supprimees')

    else :
        print('aucune version de pronote installee')


def install():
    uninstall()                     ##sortir les installations précédentes

    ##Creation du fichier reponse de l'installation

    file = open(unattend_install,'w')
    file.write("[InstallShield Silent]"'\n')
    file.write("Version=v7.00"'\n')
    file.write("File=Response File"'\n')
    file.write("[File Transfer]"'\n')
    file.write("OverwrittenReadOnly=NoToAll"'\n')
    file.write("[{26BC6156-3E08-4D06-89BD-A39711861AAA}-DlgOrder]"'\n')
    file.write("Dlg0="+uninstallkey+"-SdLicense2Rtf-0"'\n')
    file.write("Count=5"'\n')
    file.write("Dlg1="+uninstallkey+"-SdAskDestPath-0"'\n')
    file.write("Dlg2="+uninstallkey+"-AskOptions-0"'\n')
    file.write("Dlg3="+uninstallkey+"-AskOptions-1"'\n')
    file.write("Dlg4="+uninstallkey+"-SdFinish-0"'\n')
    file.write("["+uninstallkey+"-SdLicense2Rtf-0]"'\n')
    file.write("Result=1"'\n')
    file.write("["+uninstallkey+"-SdAskDestPath-0]"'\n')
    file.write("szDir=C:\Program Files\Index Education\Pronote 2018\Réseau"'\n')
    file.write("Result=1"'\n')
    file.write("["+uninstallkey+"-AskOptions-0]"'\n')
    file.write("Result=1"'\n')
    file.write("Sel-0=1"'\n')
    file.write("Sel-1=0"'\n')
    file.write("Sel-2=0"'\n')
    file.write("Sel-3=0"'\n')
    file.write("["+uninstallkey+"-AskOptions-1]"'\n')
    file.write("Result=1"'\n')
    file.write("Sel-0=1"'\n')
    file.write("["+uninstallkey+"-SdFinish-0]"'\n')
    file.write("Result=1"'\n')
    file.write("bOpt1=0"'\n')
    file.write("bOpt2=0")
    file.close()

    #print('"'+'pronote_'+year+'_'+archi+'.exe"-s -f1'+unattend_install)  ##control
    print('installing pronote-2018')
    os.system('"pronote_'+year+'_'+archi+'.exe" -s -f1'+unattend_install)

def remove():
    uninstall()
olaplanche
Messages: 178
Registration: January 26, 2017 - 11:11

November 5, 2018 - 2:29 PM

Final version of the code with working installation and uninstallation (thanks to stephane2b):
Simply replace the SERVERNAME and SERVERPORT values ​​with your own.

Edt 2018:

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *

uninstallkey = []

def install():
    print('installing wapt-edt2018')
    install_exe_if_needed("Install_EDTclient_FR_2018.0.2.1_win64.exe",silentflags='-s -f1%s\Setup.iss' % basedir,key='{56186141-47B5-4BF6-A06E-6D6EED12C720}',min_version='0.0.2.1',killbefore='Client EDT.exe')
    uninstallkey.remove('{56186141-47B5-4BF6-A06E-6D6EED12C720}')
    remove_desktop_shortcut('EDT2017.lnk')
    create_desktop_shortcut(r'EDT2018',target=u'C:\Program Files\Index Education\EDT 2018\Réseau\Client EDT.exe',arguments=r'-Adresse "SERVERNAME" -PortTcp "SERVERPORT"')

def uninstall():
    print('uninstalling wapt-edt2018')
    import tempfile
    pathuninstallfile = makepath(tempfile.gettempdir(),'Uninstall.iss')
    data = ur"""[InstallShield Silent]
Version=v7.00
File=Response File
[File Transfer]
OverwrittenReadOnly=NoToAll
[{56186141-47B5-4BF6-A06E-6D6EED12C720}-DlgOrder]
Dlg0={56186141-47B5-4BF6-A06E-6D6EED12C720}-MessageBox-0
Count=2
Dlg1={56186141-47B5-4BF6-A06E-6D6EED12C720}-SdFinishReboot-0
[{56186141-47B5-4BF6-A06E-6D6EED12C720}-MessageBox-0]
Result=6
[{56186141-47B5-4BF6-A06E-6D6EED12C720}-SdFinishReboot-0]
Result=1
BootOption=0
"""
    fichier = open(pathuninstallfile, "w")
    fichier.write(data)
    fichier.close()
    run(r'"%s\InstallShield Installation Information\{56186141-47B5-4BF6-A06E-6D6EED12C720}\setup.exe" -s -uninst -f1%s' % (programfiles32,pathuninstallfile))
    remove_file(pathuninstallfile)
    remove_desktop_shortcut('EDT2018.lnk')
    run('"MsiExec.exe" /X{498D8130-B871-4D94-9ADC-C1F99E188F3A} /qn')
Pronote 2018:

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *

uninstallkey = []

def install():
    print('installing wapt-pronote2018')
    install_exe_if_needed("Install_PRNclient_FR_2018.0.2.1_win64.exe",silentflags='-s -f1%s\Setup.iss' % basedir,key='{26BC6156-3E08-4D06-89BD-A39711861AAA}',min_version='0.0.2.1',killbefore='Client PRONOTE.exe')
    uninstallkey.remove('{26BC6156-3E08-4D06-89BD-A39711861AAA}')
    remove_desktop_shortcut('Pronote2017.lnk')
    create_desktop_shortcut(r'Pronote2018',target=u'C:\Program Files\Index Education\Pronote 2018\Réseau\Client PRONOTE.exe',arguments=r'-Adresse "SERVERNAME" -PortTcp "SERVERPORT"')

def uninstall():
    print('uninstalling wapt-pronote2018')
    import tempfile
    pathuninstallfile = makepath(tempfile.gettempdir(),'Uninstall.iss')
    data = ur"""[InstallShield Silent]
Version=v7.00
File=Response File
[File Transfer]
OverwrittenReadOnly=NoToAll
[{26BC6156-3E08-4D06-89BD-A39711861AAA}-DlgOrder]
Dlg0={26BC6156-3E08-4D06-89BD-A39711861AAA}-MessageBox-0
Count=2
Dlg1={26BC6156-3E08-4D06-89BD-A39711861AAA}-SdFinish-0
[{26BC6156-3E08-4D06-89BD-A39711861AAA}-MessageBox-0]
Result=6
[{26BC6156-3E08-4D06-89BD-A39711861AAA}-SdFinish-0]
Result=1
bOpt1=0
bOpt2=0
"""
    fichier = open(pathuninstallfile, "w")
    fichier.write(data)
    fichier.close()
    run(r'"%s\InstallShield Installation Information\{26BC6156-3E08-4D06-89BD-A39711861AAA}\setup.exe" -s -uninst -f1%s' % (programfiles32,pathuninstallfile))
    remove_file(pathuninstallfile)
    remove_desktop_shortcut('Pronote2018.lnk')
    run('"MsiExec.exe" /X{498D8130-B871-4D94-9ADC-C1F99E188F3A} /qn')
Last edited by olaplanche on Nov 8, 2018 - 08:33, edited 1 time.
- Installed WAPT version: 2.6.0.16795 Enterprise
- Server OS: Linux / Debian Bookworm
- Administration/package creation machine OS: Windows 10
User avatar
vcardon
WAPT Expert
Messages: 278
Registration: Oct 06, 2017 - 10:55 p.m.
Location: Nantes, France

November 6, 2018 - 12:09 AM

Hallelujah! The Pronote package was created by the WAPT user community.

Great job, congratulations to all!

This kind of collaboration is exactly what we expect from this forum.
Vincent CARDON
Tranquil IT
gly
Messages: 24
Registration: May 30, 2019 - 11:45

May 30, 2019 - 11:49

olaplanche wrote: Nov 5, 2018 - 2:29 PM Final version of the code with working installation and uninstallation (thanks to stephane2b):
Simply replace the SERVERNAME and SERVERPORT values ​​with your own.
...
Hello, I just came across this post and I would be very interested in being able to get your package to update my PRONOTE clients via WAPT.

Thank you very much and congratulations on your efforts.
olaplanche
Messages: 178
Registration: January 26, 2017 - 11:11

July 2, 2019 - 4:08 PM

Hello,

thank you for your interest in the work done here, but why not take the code from the Pronote package made available to the community and customize it for your institution? Because if I send you my package as is, it will be pre-configured to connect to the institution where I work. Not very practical for you...

I can help you create a customized package for your institution if you wish.
- Installed WAPT version: 2.6.0.16795 Enterprise
- Server OS: Linux / Debian Bookworm
- Administration/package creation machine OS: Windows 10
olaplanche
Messages: 178
Registration: January 26, 2017 - 11:11

July 8, 2019 - 10:50

Package code edt 2019, simply replace the SERVERNAME and SERVERPORT values ​​with your own and adapt the shortcut names if necessary:

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *

uninstallkey = []

def install():
    print('installing wapt-edt2019')
    install_exe_if_needed("Install_EDTclient_FR_2019.0.1.1_win64.exe",silentflags='-s -f1%s\Setup.iss' % basedir,key='{C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}',min_version='0.1.1',killbefore='Client EDT.exe')
    uninstallkey.remove('{C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}')
    remove_desktop_shortcut('EDT2018.lnk')
    create_desktop_shortcut(r'EDT2019',target=u'C:\Program Files\Index Education\EDT 2019\Réseau\Client\Client EDT.exe',arguments=r'-Adresse "[b]SERVERNAME[/b]" -PortTcp "[b]SERVERPORT[/b]"')

def uninstall():
    print('uninstalling wapt-edt2019')
    import tempfile
    pathuninstallfile = makepath(tempfile.gettempdir(),'Uninstall.iss')
    data = ur"""[InstallShield Silent]
Version=v7.00
File=Response File
[File Transfer]
OverwrittenReadOnly=NoToAll
[{C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-DlgOrder]
Dlg0={C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-MessageBox-0
Count=2
Dlg1={C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-SdFinishReboot-0
[{C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-MessageBox-0]
Result=6
[{C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-SdFinishReboot-0]
Result=1
BootOption=0
"""
    fichier = open(pathuninstallfile, "w")
    fichier.write(data)
    fichier.close()
    run(r'"%s\InstallShield Installation Information\{C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}\Install_EDTclient_FR_2019.0.1.1_win64.exe" -s -uninst -f1%s' % (programfiles32,pathuninstallfile))
    remove_file(pathuninstallfile)
    remove_desktop_shortcut('EDT2019.lnk')
    run('"MsiExec.exe" /X{498D8130-B871-4D94-9ADC-C1F99E188F3A} /qn')
and the contents of the Setup.iss file to be saved as a text file using Notepad++ for example in the package folder with the installation executable edt:

Code: Select all

[InstallShield Silent]
Version=v7.00
File=Response File
[File Transfer]
OverwrittenReadOnly=NoToAll
[{C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-DlgOrder]
Dlg0={C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-SdLicense2Rtf-0
Count=6
Dlg1={C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-SdAskDestPath-0
Dlg2={C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-AskOptions-0
Dlg3={C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-AskOptions-1
Dlg4={C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-AskOptions-2
Dlg5={C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-SdFinish-0
[{C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-SdLicense2Rtf-0]
Result=1
[{C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-SdAskDestPath-0]
szDir=C:\Program Files\Index Education\EDT 2019\Réseau\Client
Result=1
[{C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-AskOptions-0]
Result=1
Sel-0=1
[{C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-AskOptions-1]
Result=1
Sel-0=1
Sel-1=0
Sel-2=0
Sel-3=0
[{C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-AskOptions-2]
Result=1
Sel-0=0
[{C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-SdFinish-0]
Result=1
bOpt1=0
bOpt2=0
Sincerely,
- Installed WAPT version: 2.6.0.16795 Enterprise
- Server OS: Linux / Debian Bookworm
- Administration/package creation machine OS: Windows 10
olaplanche
Messages: 178
Registration: January 26, 2017 - 11:11

August 23, 2019 - 11:08

Code update for edt 2019 version v 0.2.1

I've integrated the Setup.iss installation file into the Python code. Simply replace the SERVERNAME and SERVERPORT values ​​with your own and adapt the shortcut names if necessary. (Note: the content of the answer file may vary from one version to another, and if you are upgrading from the 2018 version or performing a new installation, the answer file below corresponds to version 2019 0.2.1 for a new installation):

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *

uninstallkey = []

def install():
    print('installing wapt-edt2019')
    import tempfile
    import codecs
    pathinstallfile = makepath(tempfile.gettempdir(),'Setup.iss')
    data = ur"""[InstallShield Silent]
Version=v7.00
File=Response File
[File Transfer]
OverwrittenReadOnly=NoToAll
[{C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-DlgOrder]
Dlg0={C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-SdLicense2Rtf-0
Count=5
Dlg1={C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-SdAskDestPath-0
Dlg2={C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-AskOptions-0
Dlg3={C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-AskOptions-1
Dlg4={C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-SdFinish-0
[{C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-SdLicense2Rtf-0]
Result=1
[{C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-SdAskDestPath-0]
szDir=C:\Program Files\Index Education\EDT 2019\Réseau\Client
Result=1
[{C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-AskOptions-0]
Result=1
Sel-0=1
Sel-1=0
Sel-2=0
Sel-3=0
[{C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-AskOptions-1]
Result=1
Sel-0=0
[{C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-SdFinish-0]
Result=1
bOpt1=0
bOpt2=0
"""
    fichier = codecs.open(pathinstallfile, "w", encoding='mbcs')
    fichier.write(data)
    fichier.close()
    install_exe_if_needed("Install_EDTclient_FR_2019.0.2.1_win64.exe",silentflags='-s -f1%s' % pathinstallfile,key='{C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}',min_version='0.2.1',killbefore='Client EDT.exe')
    uninstallkey.remove('{C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}')
    remove_desktop_shortcut('EDT2018.lnk')
    create_desktop_shortcut(r'EDT2019',target=u'C:\Program Files\Index Education\EDT 2019\Réseau\Client\Client EDT.exe',arguments=r'-Adresse "SERVERNAME" -PortTcp "SERVERPORT"')

def uninstall():
    print('uninstalling wapt-edt2019')
    import tempfile
    pathuninstallfile = makepath(tempfile.gettempdir(),'Uninstall.iss')
    data = ur"""[InstallShield Silent]
Version=v7.00
File=Response File
[File Transfer]
OverwrittenReadOnly=NoToAll
[{C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-DlgOrder]
Dlg0={C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-MessageBox-0
Count=2
Dlg1={C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-SdFinishReboot-0
[{C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-MessageBox-0]
Result=6
[{C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}-SdFinishReboot-0]
Result=1
BootOption=0
"""
    fichier = open(pathuninstallfile, "w")
    fichier.write(data)
    fichier.close()
    run(r'"%s\InstallShield Installation Information\{C9AE9E8F-2B9F-4E02-B808-BA15CC52530F}\Install_EDTclient_FR_2019.0.2.1_win64.exe" -s -uninst -f1%s' % (programfiles32,pathuninstallfile))
    remove_file(pathuninstallfile)
    remove_desktop_shortcut('EDT2019.lnk')
    run('"MsiExec.exe" /X{498D8130-B871-4D94-9ADC-C1F99E188F3A} /qn')
Last edited by olaplanche on August 23, 2019 - 11:12, edited 1 time.
- Installed WAPT version: 2.6.0.16795 Enterprise
- Server OS: Linux / Debian Bookworm
- Administration/package creation machine OS: Windows 10
olaplanche
Messages: 178
Registration: January 26, 2017 - 11:11

August 23, 2019 - 11:11

Code update for Pronote version 2019 v 0.2.1

I've integrated the Setup.iss installation file into the Python code. Simply replace the SERVERNAME and SERVERPORT values ​​with your own and adapt the shortcut names if necessary. (Note: the content of the answer file may vary from one version to another, and if you are upgrading from the 2018 version or performing a new installation, the answer file below corresponds to version 2019 0.2.1 for a new installation):

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *

uninstallkey = []

def install():
    print('installing wapt-pronote2019')
    import tempfile
    import codecs
    pathinstallfile = makepath(tempfile.gettempdir(),'Setup.iss')
    data = ur"""[InstallShield Silent]
Version=v7.00
File=Response File
[File Transfer]
OverwrittenReadOnly=NoToAll
[{8982A5E8-BC4A-4449-B239-372E9F847A0D}-DlgOrder]
Dlg0={8982A5E8-BC4A-4449-B239-372E9F847A0D}-SdLicense2Rtf-0
Count=5
Dlg1={8982A5E8-BC4A-4449-B239-372E9F847A0D}-SdAskDestPath-0
Dlg2={8982A5E8-BC4A-4449-B239-372E9F847A0D}-AskOptions-0
Dlg3={8982A5E8-BC4A-4449-B239-372E9F847A0D}-AskOptions-1
Dlg4={8982A5E8-BC4A-4449-B239-372E9F847A0D}-SdFinish-0
[{8982A5E8-BC4A-4449-B239-372E9F847A0D}-SdLicense2Rtf-0]
Result=1
[{8982A5E8-BC4A-4449-B239-372E9F847A0D}-SdAskDestPath-0]
szDir=C:\Program Files\Index Education\Pronote 2019\Réseau\Client
Result=1
[{8982A5E8-BC4A-4449-B239-372E9F847A0D}-AskOptions-0]
Result=1
Sel-0=1
Sel-1=0
Sel-2=0
Sel-3=0
[{8982A5E8-BC4A-4449-B239-372E9F847A0D}-AskOptions-1]
Result=1
Sel-0=0
[{8982A5E8-BC4A-4449-B239-372E9F847A0D}-SdFinish-0]
Result=1
bOpt1=0
bOpt2=0
"""
    fichier = codecs.open(pathinstallfile, "w", encoding='mbcs')
    fichier.write(data)
    fichier.close()
    install_exe_if_needed("Install_PRNclient_FR_2019.0.2.1_win64.exe",silentflags='-s -f1%s' % pathinstallfile,key='{8982A5E8-BC4A-4449-B239-372E9F847A0D}',min_version='0.2.1',killbefore='Client PRONOTE.exe')
    uninstallkey.remove('{8982A5E8-BC4A-4449-B239-372E9F847A0D}')
    remove_desktop_shortcut('Pronote2018.lnk')
    create_desktop_shortcut(r'Pronote2019',target=u'C:\Program Files\Index Education\Pronote 2019\Réseau\Client\Client PRONOTE.exe',arguments=r'-Adresse "SERVERNAME" -PortTcp "SERVERPORT"')

def uninstall():
    print('uninstalling wapt-pronote2019')
    import tempfile
    pathuninstallfile = makepath(tempfile.gettempdir(),'Uninstall.iss')
    data = ur"""[InstallShield Silent]
Version=v7.00
File=Response File
[File Transfer]
OverwrittenReadOnly=NoToAll
[{8982A5E8-BC4A-4449-B239-372E9F847A0D}-DlgOrder]
Dlg0={8982A5E8-BC4A-4449-B239-372E9F847A0D}-MessageBox-0
Count=2
Dlg1={8982A5E8-BC4A-4449-B239-372E9F847A0D}-SdFinishReboot-0
[{8982A5E8-BC4A-4449-B239-372E9F847A0D}-MessageBox-0]
Result=6
[{8982A5E8-BC4A-4449-B239-372E9F847A0D}-SdFinishReboot-0]
Result=1
BootOption=0
"""
    fichier = open(pathuninstallfile, "w")
    fichier.write(data)
    fichier.close()
    run(r'"%s\InstallShield Installation Information\{8982A5E8-BC4A-4449-B239-372E9F847A0D}\Install_PRNclient_FR_2019.0.2.1_win64.exe" -s -uninst -f1%s' % (programfiles32,pathuninstallfile))
    remove_file(pathuninstallfile)
    remove_desktop_shortcut('Pronote2019.lnk')
    run('"MsiExec.exe" /X{498D8130-B871-4D94-9ADC-C1F99E188F3A} /qn')
- Installed WAPT version: 2.6.0.16795 Enterprise
- Server OS: Linux / Debian Bookworm
- Administration/package creation machine OS: Windows 10
olaplanche
Messages: 178
Registration: January 26, 2017 - 11:11

August 23, 2019 - 11:19

Let me know if it would be clearer if the latest codes were on the first page of the first post and I cleaned up the obsolete codes?!
- Installed WAPT version: 2.6.0.16795 Enterprise
- Server OS: Linux / Debian Bookworm
- Administration/package creation machine OS: Windows 10
jlatieule
Messages: 59
Registration: July 3, 2019 - 9:18 AM

August 27, 2019 - 09:36

The idea of ​​recreating the Setup.iss file from the wapt script is quite good.

To upgrade from the 2018 version, it might be advisable to first uninstall Pronote 2018 x86 and x64 (using different uninstallation keys). This way, the Setup.iss file can be used as is.

If even older versions are still installed, the installation will get stuck at the step "Do you want to remove the versions: ***"
System and Network Administrator at Domitia Habitat
Locked