[Resolved] Package customization: Start menu

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
User avatar
Jonattend
Messages: 43
Registration: March 26, 2018 - 2:45 PM

March 26, 2018 - 3:00 PM

Hello,

WAPT Server: Debian 9.0.3
WAPT Console: 1.3.1.3.0 on Windows 7 x64
WAPT Client: 1.3.13.0
Client machines: Running Win7 x32 or Win7 x64.

As a new WAPT user (thanks to JRES 2017 for the introduction), I would like to know if it is possible to customize the packages before installation?

I'd like to have shortcuts for office applications like LibreOffice placed in "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Office Tools".
For multimedia software (VLC, Audacity, Format Factory, etc.), I'd like the Start Menu shortcuts to go to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Multimedia Tools,
and so on.

I've seen that it's possible to edit the setup.py file, but for VLC, for example, I haven't found anything in either the setup.py file or the switches available in their installer.
How can I do this?
The idea is to create a post-installation, zero-touch package tailored to the target machine.

Thanks for any suggestions. :)
Last edited by Jonattend on May 15, 2018 - 08:18, edited 3 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
agauvrit
WAPT Expert
Messages: 238
Registration: Nov 17, 2016 - 10:25
Location: Nantes
Contact :

March 26, 2018 - 4:34 PM

Hello,

The easiest way is to delete the shortcuts at the end of the package installation and recreate them in the desired locations.

See the documentation: https://www.wapt.fr/fr/doc/CreationPaqu ... shortcuts

Alexandre
User avatar
Jonattend
Messages: 43
Registration: March 26, 2018 - 2:45 PM

March 26, 2018 - 4:59 PM

Hello,
unless I'm mistaken, we're talking about shortcuts on the user's desktop, not in the Start menu... right?
The idea of ​​deleting and recreating the shortcut is perfect. But is that possible in the Start menu?
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
agauvrit
WAPT Expert
Messages: 238
Registration: Nov 17, 2016 - 10:25
Location: Nantes
Contact :

March 26, 2018 - 5:10 PM

My apologies, I read too quickly

For Start menu shortcuts, it's possible using the following functions: remove_programs_menu_shortcut And create_programs_menu_shortcut
User avatar
Jonattend
Messages: 43
Registration: March 26, 2018 - 2:45 PM

March 27, 2018 - 08:15

Shame on me for not reading the entire document... I'll look into that and give feedback.

Thanks for the tip ;)
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

April 9, 2018 - 5:09 PM

Hello,
what would be the correct syntax, for example, to create a VLC shortcut in the Start menu (All Users)\Multimedia Tools\?

In the `def install()` function, right after `remove_desktop_shortcut`, I'd be tempted to use `create_programs_menu_shortcut`, but I'm unsure about the arguments to pass... in the example with the WAPT Console, not all the arguments are used?
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
htouvet
WAPT Expert
Messages: 436
Registration: March 16, 2015 - 10:48
Contact :

April 11, 2018 - 10:45

With Wapt 1.5.1.23:

Code: Select all

def install():
    ...
    create_programs_menu_shortcut('VLC',target=makepath(programfiles64,'VideoLAN','VLC','vlc.exe'),folder=u'Outils multimédias')
    
Tranquil IT
User avatar
vcardon
WAPT Expert
Messages: 278
Registration: Oct 06, 2017 - 10:55 p.m.
Location: Nantes, France

April 11, 2018 - 10:08 PM

Hello Jonattend,

Hubert suggests a solution using WAPT version 1.5, while you're currently on 1.3. There's a good chance Hubert's suggestion will work for you in the short term.

Your best option is to upgrade to 1.5. Version 1.5 is far superior to 1.3, and you'll receive reliable advice and suggestions every time.

At Tranquil IT, version 1.3 will quickly become obsolete because fewer and fewer public repositories will provide ready-to-use packages for WAPT 1.3.

Version 1.5 is really good and doesn't justify staying on 1.3.

Regards,

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

April 12, 2018 - 1:51 PM

Hello,

thank you for your replies.

When I wrote this request, I was indeed on version 1.3, but I've since upgraded to 1.5 :D (see signature)

. I'll run some tests and post an update. ;)
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

May 11, 2018 - 4:04 PM

Good morning,
I was (finally) able to run some tests again... and it works :)

I'm posting my memo here, which might be useful to others in need:

WAPT: Modify an application shortcut: example: the VLC shortcut should land in Programs\Multimedia Tools\

- Open the setup.py file using PyScripter
- in the "def install()" section, insert:

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éés : celui par défaut et celui qu'on a ajouté
  remove_tree(r'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\VideoLAN')

- save the changes
- Perform a test on the test machine via Run Configurations, install
- If the test is OK, run Configurations, -i-build-upload to upload the package to the server

Result: when installing VLC via WAPT, the shortcut will go in Programs\Multimedia Tools.

Thank you 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
Locked