[SOLVED] Create_shortcut() function with a URL

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
Locked
User avatar
t.heroult
Messages: 307
Registration: December 8, 2020 - 10:13 AM

July 23, 2024 - 3:39 PM

Good morning
I'm trying to create shortcuts to web addresses using the create_shortcut() function, but it returns an error. Does the function only work with local targets?

Here is the message:

Code: Select all

2024-07-23 15:32:26,424 CRITICAL Fatal error in install script: 0x80070057 : Paramètre incorrect.:
Traceback (most recent call last):
  File "C:\Program Files (x86)\wapt\common.py", line 4235, in install_wapt
    exitstatus = setup.install()
  File "c:\waptdev\La_Normandise_2024.7.16-1_x64_PROD_fr-wapt\setup.py", line 73, in install
    create_shortcut(icopath,target=icotarget)
  File "C:\Program Files (x86)\wapt\setuphelpers_windows.py", line 3983, in create_shortcut
    winshell.CreateShortcut(path, target, arguments, wDir, (icon, 0), '')
  File "C:\Program Files (x86)\wapt\lib\site-packages\winshell.py", line 887, in CreateShortcut
    lnk = shortcut (Target)
  File "C:\Program Files (x86)\wapt\lib\site-packages\winshell.py", line 507, in shortcut
    return Shortcut.from_target (source)
  File "C:\Program Files (x86)\wapt\lib\site-packages\winshell.py", line 414, in from_target
    return cls (
  File "C:\Program Files (x86)\wapt\lib\site-packages\winshell.py", line 391, in __init__
    setattr (self, k, v)
  File "C:\Program Files (x86)\wapt\lib\site-packages\winshell.py", line 456, in _set_path
    self._shell_link.SetPath (path)
pywintypes.com_error: (-2147024809, 'Paramètre incorrect.', None, None)

FATAL ERROR : 0x80070057 : Paramètre incorrect.
Exit code:  3
How can I generate a shortcut to a web address?

Sincerely
Tom
Last edited by t.heroult on July 24, 2024 - 13:20, edited 1 time.
Server: WAPT Enterprise 2.6.1.17786 on Debian
Consoles: Windows 10 & 11
Infrastructure: Windows

Did you know? When parrotfish undergo smoltification, their osmoregulation mechanism is reversed!
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

July 23, 2024 - 5:43 PM

Hello Thomas,

Code: Select all

create_shortcut('mon_lien.url','https://wapt.tranquil.it')
Make sure to include a .url at the end of the link name :-)

Sincerely,

Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
User avatar
t.heroult
Messages: 307
Registration: December 8, 2020 - 10:13 AM

July 24, 2024 - 1:20 PM

Great, thanks Denis!
Server: WAPT Enterprise 2.6.1.17786 on Debian
Consoles: Windows 10 & 11
Infrastructure: Windows

Did you know? When parrotfish undergo smoltification, their osmoregulation mechanism is reversed!
Locked