tags:

views:

222

answers:

2

I want my application to run as soon as user login. For this I need the modify the /Library/Preferences/loginwindow.plist. Manually I can do this using Plist Editor but I want to do this in my code. How can I do this Programatically using C/C++

+1  A: 

No, you do not do this by editing loginwindow.plist. Use the LSSharedFileList API, which is in the Launch Services framework within the Core Services umbrella framework.

Peter Hosey
A: 

You should probably create a launchd job instead.

Azeem.Butt