Add AS to all user's login items or to computer startup


I have just finished an apple script that I need to have run when each computer starts up. Since the computers I am deploying the script on have multiple users, I was looking for a way to add the script to the login items for all the users or to the computer start-up items. I have tried adding the script to /Library/StartupItems/ but this opens the finder behind the login window, using the root account which then stays active after the script has finished. The script is being saved as an read only app.

. So, I was wondering if anyone had found a way of doing this without everyone getting root access to the computer at the login screen.

Thanks :slight_smile:

the place to look for is the ~/Library/Preferences/loginwindow.plist

if the users startup items lists are the same as the next users then you could try and copy the loginwindow.plist to each users ~/Library/Preferences/ folder which , might be an idea to get property list editor out of the developers tools if not all readdy installed.

shell script would be like this
for userhome in /Users/* ;
cp /loginwindow.plist ${userhome}/Library/Preferences/loginwindow.plist ;


That seemed to work, now the script is working for all users.

Thanks for your help :slight_smile:

good to here
oh and for any users that you might add in the future put the file in the user template folder as well :

/System/Library/User Template/English.lproj/Library/Preferences/