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

Sean123

macrumors newbie
Original poster
Feb 5, 2011
6
0
I need help auto launching a program for all users on a MAC. Im working with Active Directory so I dont know who will be logging in. I have a little program what after login it launchs showing my acceptable use policy and they have to click ok and it goes away. Can anyone help?
 
I need help auto launching a program for all users on a MAC. Im working with Active Directory so I dont know who will be logging in. I have a little program what after login it launchs showing my acceptable use policy and they have to click ok and it goes away. Can anyone help?
Just add it to the Login Items under each user account. Or make it your wallpaper.
 
Is there a way to set it at the root or system level so that it happens for every account?
 
Just add it to the Login Items under each user account.

Tough to do when you don't know who will be logging in, just as the OP said, since they are using AD.

Also, why suggest a wallpaper when this is more than possible.

OP, Launchd is your answer. Here is a sample plist:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Label</key>
	<string>com.company.usepolicy</string>
	<key>LaunchOnlyOnce</key>
	<true/>
	<key>ProgramArguments</key>
	<array>
		<string>open</string>
		<string>Path to my.app</string>
	</array>
	<key>RunAtLoad</key>
	<true/>
	<key>ServiceDescription</key>
	<string>Launches acceptable use policy</string>
</dict>
</plist>

You want to put this in /Library/LaunchAgents, and it will run for any user who logs in, AD user or not. You generally want to name it in reverse domain format for example: com.company.usepolicy.plist

You could also point directly at the binary within.

Hope that helps. You can find more about it here:
http://developer.apple.com/library/.../Reference/ManPages/man5/launchd.plist.5.html
 
I already have a program or script that does this. Everything was fine until we went to the AD user names. it is located in /Library/Scripts/AUPAgree is ther a way to just launch AUPAgree at everyones login?
 
I already have a program or script that does this. Everything was fine until we went to the AD user names. it is located in /Library/Scripts/AUPAgree is ther a way to just launch AUPAgree at everyones login?

However you want to do it. If you want to point at an app or a script, it doesn't matter. All you need to do is change the plist to match what you want. You are still going to put in /Library/LaunchAgents.

The plist is not a script, it is a manifest that launchd reads to determine what to run and how. It needs to be in that format and in that location.
 
However you want to do it. If you want to point at an app or a script, it doesn't matter. All you need to do is change the plist to match what you want. You are still going to put in /Library/LaunchAgents.

The plist is not a script, it is a manifest that launchd reads to determine what to run and how. It needs to be in that format and in that location.



ok I think Im starting to understand. Where in the code do I point to my program? /Library/Scripts/Program?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.