/build/static/layout/Breadcrumb_cap_w.png

Deploying to a mac to have application start on login

i have the following command that i need to distribute/script to all of the macs in my company and cant figure out how to.  

osascript -e 'tell application "System Events" to make login item at end with properties {path: "/Applications/CCAAgent.app", hidden:false}'

Basically it needs to be run from the mac os terminal.  any help would be greatly appreciated.


0 Comments   [ + ] Show comments

Answers (3)

Posted by: jknox 11 years ago
Red Belt
1

Do you have something like Casper or a K1000 to deploy it with? 

If not, your options are somewhat limited.  You would have to use a remote solution like VNC or Apple Remote Desktop.  You could also SSH to the machines that need it.  Both VNC and/or SSH would have to be enabled on the end user machine as they are not by default.


Comments:
  • Sorry, i should have mentioned that im using the k1000 in our environment - ddubinsky 11 years ago
    • In that case, the easiest way to do it would be with an online shell script. I believe you should be able to use that command as is.

      Please also add K1000 labels to your question if possible. - jknox 11 years ago
Posted by: ddubinsky 11 years ago
White Belt
0

I followed your suggestion to run an online shell script, and even though the command runs without fail on the mac directly, running it from KACE gives me the error below. 

41:51: syntax error: A class name can’t go after this identifier. (-2740)

Activity Log

2013-03-28 16:08:49: Alert not enabled, moving to next phase....
2013-03-28 16:08:50: Sending script CCAAgent.sh to client....
2013-03-28 16:08:52: Script sent
2013-03-28 16:08:52: Executing script....
2013-03-28 16:08:54: Error 1 received while executing script


Comments:
  • Can you post your script's settings? I have found configuring scripts for MacOS to be temperamental. - chucksteel 11 years ago
  • Chuck, thanks for the response. The settings are below. They are a bit small and hard to read. Let me know if you need me to explode the view for any of them. - ddubinsky 11 years ago
Posted by: ddubinsky 11 years ago
White Belt
0


Comments:
  • When you run an online shell script for MacOS you can't have it run as the local user and it runs as root, I think. I believe that this osascript would only add the login item for the current user, and not all users. To have a script run for all users it needs to be added as a LoginHook, from what I understand. - chucksteel 11 years ago
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ