Clean up the start menu with a WAPT package

Share your tips or issues concerning the WAPT Console or WAPT Agent here
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
Locked
User avatar
Jonattend
Messages: 43
Registration: March 26, 2018 - 2:45 PM

November 29, 2018 - 11:59

Good morning,
I use WAPT to deploy various software applications. So far, nothing illogical, you might say :)

For each software, I specified, in the def install() the final shortcut in the All Users start menu.

Code: Select all

  print("Creation du raccourci vers Outils Multimedias ....")
  # creation du raccourci dans le menu demarrer, programmes, outils multimedias ...
  create_programs_menu_shortcut('VLC',target=makepath(programfiles64,'VideoLAN','VLC','vlc.exe'),folder=u'Outils Multimedias')
  # suppression du raccourci de l application dans le menu demarrer, programmes ... sinon deux raccourcis seront crées : celui par défaut et celui qu'on a ajouté. Ajout de l'argument ignore_errors sinon erreur sous Windows 10 si réinstallation du paquet ...
  remove_tree(r'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\VideoLAN', ignore_errors=True)
Example :
- VLC: lands in Start Menu\Programs\Multimedia Tools
- GeoGebra: lands in Start Menu\Programs\Maths Tools
etc ....

The problem is that if there's a package update, the setup.py file won't be preserved. So I'd have to modify setup.py again so the shortcuts land in the correct location...
So, I was wondering: is it possible to create a "final" package whose sole purpose would be to clean up the start menu after installing software via WAPT?
example :
- VLC installation
- GeoGebra installation
- Anaconda installation
- Application of the Start Menu sorting package to classify applications into the correct subfolders:
-> VLC: Multimedia Tools
-> GeoGebra: Math Tools
-> Anaconda: Programming Tools

If WAPT can execute a .bat file, I can always do it via a .bat file. But the most important thing is that this package is executed very last, relative to the others...

Thank you for your suggestions :)
Last edited by Jonattend on 20 Feb 2019 - 11:41, edited 2 times.
WAPT Server version: 1.8.1 on Debian 10
WAPT Agent version: 1.8.1.6756
WAPT Setup version: 1.8.1.6756 on Windows10 v1909
WAPT Deploy version: 1.8.1.6756
User avatar
vcardon
WAPT Expert
Messages: 278
Registration: Oct 06, 2017 - 10:55 p.m.
Location: Nantes, France

November 29, 2018 - 2:42 PM

Jonattend wrote: Nov 29, 2018 - 11:59 AM So, I was wondering: is it possible to create a "final" package whose sole purpose would be to clean up the Start Menu after installing software via WAPT?
For example:
- VLC installation
- GeoGebra installation
- Anaconda installation
- application of the Start Menu sorting package to classify the applications in the correct subfolders:
-> VLC: Multimedia Tools
-> GeoGebra: Math Tools
-> Anaconda: Programming Tools
It would be more a matter of creating a package whose setup.py handles managing your shortcuts and whose control lists the dependent software.

The dependencies will be installed first and then your shortcut package will run over them, cleaning them up as needed.

Sincerely.
Vincent CARDON
Tranquil IT
User avatar
Jonattend
Messages: 43
Registration: March 26, 2018 - 2:45 PM

November 29, 2018 - 3:15 PM

Hmmmmmmmm, I see the idea!
I'll try it out and give you feedback.

Thanks! ;)
WAPT Server version: 1.8.1 on Debian 10
WAPT Agent version: 1.8.1.6756
WAPT Setup version: 1.8.1.6756 on Windows10 v1909
WAPT Deploy version: 1.8.1.6756
User avatar
Jonattend
Messages: 43
Registration: March 26, 2018 - 2:45 PM

November 30, 2018 - 3:17 PM

Well, it works pretty well!!

I tried it with two apps and it does the job perfectly. ;)

Thanks for your help. ;)
WAPT Server version: 1.8.1 on Debian 10
WAPT Agent version: 1.8.1.6756
WAPT Setup version: 1.8.1.6756 on Windows10 v1909
WAPT Deploy version: 1.8.1.6756
User avatar
Jonattend
Messages: 43
Registration: March 26, 2018 - 2:45 PM

February 19, 2019 - 2:53 PM

Hello,

After learning "the correct way to update a package," I'm wondering if this so-called "final shortcut" package is still useful...

Let's imagine:
- I have a VLC package that needs to be installed in "Media Tools"
- I have a Mozilla Firefox ESR package that needs to be installed in the "Programs" folder in the Start menu.

- Either there's no "update-package-source" file in setup.py, in which case I just replace my .exe file without touching my setup.py file (for example, VLC)
- Or there is an "update-package-source" file in setup.py, which I run, and then I re-upload the package (here, Firefox-ESR).

Therefore, I would use a package group to install several programs, and the shortcut management would be handled in each setup.py file.

Is this correct?

Thank you for your clarification.
WAPT Server version: 1.8.1 on Debian 10
WAPT Agent version: 1.8.1.6756
WAPT Setup version: 1.8.1.6756 on Windows10 v1909
WAPT Deploy version: 1.8.1.6756
Locked