Why not use [NSWorkspace launchApplication:] method?

<http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWorkspace_Class/Reference/Reference.html#//apple_ref/occ/instm/NSWorkspace/launchApplication:>

2008/7/1 Barrie Green <[EMAIL PROTECTED]>:
> Hi all,
>
> I want to write a quick little cocoa app that fires off Safari.
>
> I started with something like
>
> int main(int argc, char* argv[]) {
>  ...
>  ...
>  if(execv("/Applications/Safari.app", someArgs) == -1) {
>    NSLog(@"execv failed with %s", strerror(errno));
>  }
> }
>
> It always fails with 'Permission denied', OK I kinda expect that. But
> how do I fix it?
>
> Would authorization would help? I've looked a the docs a little and it
> would appear that I should do a
> AuthorizationCreate/AuthorizationCopyRights shuffle but if so what
> rights should I use?
>
> Ideally I would like to run the app without it asking me for my
> password, how could I achieve that?
>
> TIA
>
> bg
> _______________________________________________
>
> Cocoa-dev mailing list ([email protected])
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/marcelo.alves%40redefined.cc
>
> This email sent to [EMAIL PROTECTED]
>
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to