Creating app shortcut through JAMF doesn't work but it works on manual creation
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
08-11-2023
01:12 AM
- last edited on
03-04-2025
03:04 AM
by
kh-richa_mig
Hi after installing app through JAMF when I am trying to create a shortcut by running this set of code.
-------------------------------------------macShortcut.py-----------------------------------------------------------------
from re import sub
from pyshortcuts import make_shortcut
import subprocess
import TPLogger as lg
user = subprocess.getoutput('ls -l /dev/console | cut -d " " -f4')
ruta_user = f'/Users/{user}/Desktop'
ruta_app = f'/Applications'
try:
make_shortcut('/opt/ex_app.py', name='ex_app', icon='/opt/ex_app/Resources/Images/ex_app.icns',terminal=False, folder=ruta_user)
make_shortcut('/opt/ex_app/ex_appscreen.py', name='ex_app', icon='/opt/ex_app/Resources/Images/ex_app.icns',terminal=False, folder=ruta_app)
except Exception as e:
lg.log_info(e)
-----------------------------------------------------------------------------------------------------------------
sudo python3 /opt/ex_app/macShortcut.py
-----------------------------------------
When I create this shortcut/app.exe directly from the mac Terminal, the shortcut works but when I try to create it from jamf policy the shortcut gets created but when I try to run it. it shows blank screen with no information.
0 REPLIES 0
