Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

escobar187

macrumors newbie
Original poster
Jan 24, 2011
2
0
I'm trying to run multiple scripts when the user login.. I know the command to run loginhook but that command will runn only one script.. how can i run multiple scripts ?

Thanks,
 
There are a few solutions:

1) Have one master script that runs other scripts. There is a lot of flexibility possible here.

2) Use MCX and multiple containers (machine, users, groups, etc) to have multiple loginscripts (a bit of a hack).

3) Add multiple items to the LoginItems (sometimes a similar effect)

4) Rather than using loginhooks, create your items as LaunchAgents. This is far more flexible, but takes a bit more care.

5) If you need to run very early in the login process, then a SecurityAgent plugin is possible, but this is far more difficult than any other option.

All of these have their plusses and minuses, and what is the most suitable depends a lot on what you are trying to accomplish.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.