Bonjour,
Je débute avec wapt, je suis bloqué sur cette partie de mon script (en
rouge) :
*# -*- coding: utf-8 -*-*
*from setuphelpers import **
*uninstallkey = []*
*# raccourcis*
*RaccourcisDossier = "_LFIB MATHS"*
*RaccourcisName = u"Anaconda Navigator (Anaconda3)"*
*RaccourcisName2 = u"Spyder (Anaconda3)"*
*RaccourcisDossierProgramm = u"C:\ProgramData\Anaconda3"*
*ExeName = 'pythonw.exe'*
*ExeName2 = 'pythonw.exe'*
*def install():*
* if os.path.isdir('C:\ProgramData\Anaconda3') == False:*
*
install_exe_if_needed("Anaconda3-2020.02-Windows-x86_64.exe",'/S',key='',min_version='2020.02')*
* else:*
* print ('Anaconda already install')*
*print('Creation du lien dans le menu demarrer _LFIB MATHS')*
*create_programs_menu_shortcut(RaccourcisName,target=makepath(RaccourcisDossierProgramm,ExeName),folder=RaccourcisDossier)*
*def uninstall():*
* print('uninstalling Anaconda')*
* run(r'"C:\ProgramData\Anaconda3\Uninstall-Anaconda3.exe" /S')*
* print('Supression du lien dans le menu demarrer _LFIB MATHS')*
*remove_programs_menu_shortcut(RaccourcisName,folder=RaccourcisDossier)*
*
remove_programs_menu_shortcut(RaccourcisName2,folder=RaccourcisDossier)*
Le raccourci dont j’ai besoin est le suivant :
Nom : ‘Anaconda Navigator (Anaconda3).lnk’
Cible : ‘C:\ProgramData\Anaconda3\pythonw.exe
C:\ProgramData\Anaconda3\cwp.py C:\ProgramData\Anaconda3
C:\ProgramData\Anaconda3\pythonw.exe
C:\ProgramData\Anaconda3\Scripts\anaconda-navigator-script.py’
Démarrer dans : ‘C:\Users\Public\Documents\Python Scripts’
Destination : ‘C:\ProgramData\Microsoft\Windows\Start Menu\Programs\_LFIB
MATHS’
Si ce n’est pas possible, deuxième option, j’allais partir sur cela :
create_programs_menu_shortcut(folder = RaccourcisDossier) ß cette
commande ne fonctionne pas pour créer un répertoire dans le Menu Démarrer,
vous auriez autre chose ?
filecopyto('Anaconda Navigator
(Anaconda3)','C:\ProgramData\Microsoft\Windows\Start Menu\Programs\_LFIB
MATHS')
filecopyto('Spyder (Anaconda3)','C:\ProgramData\Microsoft\Windows\Start
Menu\Programs\_LFIB MATHS')
Je suppose qu’il doit y avoir plus simple.
Merci de votre temps.
Cordialement.
David.