Skip to main content
Question

Auto launch a .App package with a script through self service


Forum|alt.badge.img+5

I'm having an issue with what I would thought was a simple problem, if anyone has any suggestions it would be much appreciated.

I have built a policy that will deploy a .app into the /Applications folder. I want the program to be initiated once the .app package is fully downloaded through a script without user interaction.

I thought it would just be:

#!
open /Applications/(program).app

Thanks,

Edmund

5 replies

Forum|alt.badge.img+15
  • Contributor
  • 88 replies
  • October 22, 2012

You will need to nest a bit deeper - this will open word:
open /Applications/Microsoft Office 2011/Microsoft Word.app/Contents/MacOS/Microsoft Word


talkingmoose
Forum|alt.badge.img+36
  • Community Manager
  • 1901 replies
  • October 22, 2012
open /Applications/(program).app

Run this command with the -a option, which tells the open command you're opening an application:

open -a /Applications/(program).app

russeller
Forum|alt.badge.img+15
  • Valued Contributor
  • 215 replies
  • October 22, 2012

Wouldn't this launch the app as root? Is that even an issue?


Forum|alt.badge.img+7
  • Valued Contributor
  • 56 replies
  • October 24, 2012

I am looking to do this too, but need the app to run as the logged in user not root. Anyone have any luck with this?


leslie_h
Forum|alt.badge.img+14
  • Employee
  • 100 replies
  • October 24, 2012

App looks to open as the logged in user when initiated through self service. Note, you can also use the apps bundle identifier, i.e.:
open -b com.apple.textedit


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings