<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">This is probably not a good idea (if it will even let you) since these scripts are run as root. If you do succeed in opening an app like that it will most likely open in the root context which is a really really really bad idea.<div><br></div><div>One thing you could try is su'ing as the user.</div><div><br></div><div>#!/bin/bash</div><div><br></div><div>USER=$3 # From Casper</div><div><br></div><div>su $USER -c "open /Applications/Utilities/MyApp.app"</div><div><br></div><div>or </div><div><br></div><div>su $USER -c "/Applications/Utilities/MyApp.app/Contents/MacOS/MyApp"</div><div><br></div><div>A lot of times open doesn't like being run from a script unless it is run from the current GUI user.<br><div><div> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" color="#8776B3" size="4"><b style="color: rgb(135, 118, 179); font-size: 14px; font-weight: bold; "><br class="Apple-interchange-newline">Ryan Harter</b></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" color="#8776B3" size="2">UW - Stevens Point</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" color="#8776B3" size="2">Workstation Developer</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" color="#8776B3" size="2">715.346.2716</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="mailto:Ryan.Harter@uwsp.edu"><font class="Apple-style-span" size="2"><span class="Apple-style-span" style="color: rgb(0, 0, 238); ">Ryan.Harter@uwsp.edu</span></font></a></div></span> </div><br><div><div>On Feb 3, 2009, at 2:36 PM, Dagel, Rich wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div> <font face="Verdana, Helvetica, Arial"><span style="font-size:10pt">I am trying to write a script that will open an app once it is installed by a policy. I have to script set to run after but no luck.<br> <br> #!/bin/sh<br> <br> open /Applications/Utilities/MyApp.app<br> <br> <br> </span><font size="2"><span style="font-size:8pt">Rich Dagel<br> Senior Technology Specialist<br> <span><image.gif></span><br> Landor Associates<br> 1001 Front Street<br> San Francisco, CA 94111<br> United States<br> 415 365 3933<br> <font color="#0000FF"><u><a href="http://www.landor.com">http://www.landor.com</a><br> </u></font></span></font></font><font size="2"><span style="font-size:8pt"><font color="#0000FF"><u><font face="Lucida Grande CE"><a href="Rich.Dagel@landor.com">Rich.Dagel@landor.com</a></font></u></font></span></font><font face="Verdana, Helvetica, Arial"><span style="font-size:10pt"><br> </span></font> </div> <span><ATT00001.txt></span></blockquote></div><br></div></div></body></html>