Using a package to distribute LC app over ARD

Thierry Douez th.douez at gmail.com
Fri Apr 18 15:53:00 CEST 2014


Hi Richard,

There is an option to launch a shell which will execute some Applescript.

Here is one I just tried successfullly on Mavericks:

I create a text file testOSAscript.sh which contains:
--------------------------------
#!/bin/bash

osascript <<EndScript
  tell application "System Events"
     make new login item at end with properties {path:"$1", hidden:true}
     properties of login items
   end tell
EndScript
----------------------------------

and did execute this way on the Terminal:

>  sh testOSAscript.sh "/the/fullpath/of/myApp.app"

in the script file, you can get rid of the properties line (here for debug)

BTW, you can run this script many times, it won't create a new item
if it's already set!

Tested on Mavericks only!

HTH,

Regards,

Thierry

------------------------------------------------
Thierry Douez - http://sunny-tdz.com
Maker of sunnYperl - sunnYmidi - sunnYmage - sunnYpdf


2014-04-17 13:49 GMT+02:00 Richard Miller <wow at together.net>:
> I am using Iceberg to create a Mac installer package which contains my LC
> app. This package is then being used by Apple Remote Desktop to
> automatically install to multiple Mac's. These Mac's are generally in a
> logged-out state during the install. All of this works fine, except for this
> last piece.
>
> After the install, I need to add my app to the users list of Startup items.
> I know Iceberg can run a post-install script. But I'm not sure if it is
> possible to add to the Startup items list while the Mac is logged out. If it
> is possible, perhaps someone can help me create the shell script to do this.
> I know how to do it with AppleScript, but not with a shell script.
>
> Thanks,
> Richard Miller



More information about the use-livecode mailing list