[SOLVED] Creating a shortcut with an environment variable
Published: August 5, 2024 - 2:07 PM
Hello!
I'm trying to create a slightly unusual shortcut on the desktop and in the Start Menu.
Here's the shortcut's target:
%PRISM_ROOT%\Python311\Prism.exe "%PRISM_ROOT%\Scripts\PrismTray.py" projectBrowser.
I tried using this method:
create_desktop_shortcut(r'Prism Wapt',target=r'%PRISM_ROOT%\Python311\Prism.exe %PRISM_ROOT%\Scripts\PrismTray.py projectBrowser')
but without success.
Another solution would be to copy files to %APPDATA%\Microsoft\Windows\Start Menu\Programs\ and %UserProfile%\Desktop\, but I'd prefer to use the method offered by Wapt!
Thanks in advance for your help!
ValDo
EDIT: I'm on version 2.5.5.15691, package and agent on Windows
I'm trying to create a slightly unusual shortcut on the desktop and in the Start Menu.
Here's the shortcut's target:
%PRISM_ROOT%\Python311\Prism.exe "%PRISM_ROOT%\Scripts\PrismTray.py" projectBrowser.
I tried using this method:
create_desktop_shortcut(r'Prism Wapt',target=r'%PRISM_ROOT%\Python311\Prism.exe %PRISM_ROOT%\Scripts\PrismTray.py projectBrowser')
but without success.
Another solution would be to copy files to %APPDATA%\Microsoft\Windows\Start Menu\Programs\ and %UserProfile%\Desktop\, but I'd prefer to use the method offered by Wapt!
Thanks in advance for your help!
ValDo
EDIT: I'm on version 2.5.5.15691, package and agent on Windows