• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Launch Path Not Accessible
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Launch Path Not Accessible


  • Subject: Launch Path Not Accessible
  • From: Steve Cronin <email@hidden>
  • Date: Sat, 02 Aug 2008 15:01:58 -0500

Folks;

I'm trying to do something that seems like it should be easy, but I'm stymied by what I think is a permissions error I don't understand.

I'm trying to run a script using NSTask.
I have the static script stored as a separate file in my bundle.
I have created a folder in my "Applications Support" directory called "Scripts" and copied my script and several items into this directory.
Note that this has a space in the full pathname!


SO I have tried the following:
NSString *myScriptPath = [[self scriptsFolderPath] stringByAppendingPathComponent:@"myUseful.script"]; //yes I have verified this is a valid path!!!
NSTask *task = [[[NSTask alloc] init] autorelease];
[task setLaunchPath: myScriptPath];
[task setArguments:[NSArray arrayWithObject:...]];
[task setStandardInput:[NSPipe pipe]];
[task launch];


ERRROR: launch path not accessible

So, thinking that the 'space' maybe wanking out the 'setLaunchPath' I tried to convert to a 'safe' url path:
NSURL *myScriptFileURL = [NSURL fileURLWithPath:t];
...
[task setLaunchPath:[myScriptFileURL absoluteString]];


Same error!

The docs don't make it clear TO ME why I would need special permissions to launch a script in my own "App Support" directory.
Am I out in the weeds chasing the wrong rabbits?


Any guidance appreciated!
Steve



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Launch Path Not Accessible
      • From: Andrew Farmer <email@hidden>
  • Prev by Date: Re: 2 outline views, selection changes
  • Next by Date: How to debug Core Data save-as failure
  • Previous by thread: Re: NSTableView Question
  • Next by thread: Re: Launch Path Not Accessible
  • Index(es):
    • Date
    • Thread