[Lazarus] Mac OS X - registering login item - to start my application after user's login

Fred Flinestone ffred69 at gmail.com
Thu Jan 13 15:01:58 CET 2011


Hello all,

I am trying to execute this from my code to assure autostart of my
application, but nothing happens and the item is not added.

ExecuteProcess('/usr/bin/defaults', 'write loginwindow
AutoLaunchedApplicationDictionary -array-add
''<dict><key>Hide</key><false/><key>Path</key><string>/Applications/MyApp.app</string></dict>''');

The command is definitely correct, because from terminal does its job.
There must be something changed during execution.

Or do you have better idea how to register login item in different way?

Thanks.

ff




More information about the Lazarus mailing list