site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Le 15 déc. 08 à 11:45, Rakesh Singhal a écrit : Hi all, I think these are general queries still I am not aware of answer of following queries: 1. I create a package for MyApp application and option is given to user to change the path to install the MyApp application. Now in my code, I want to find out the path of MyApp application so that I can access it. So how to get the path of application? 2. MyApp is running on my system and I need to find out that is it running or not then how to find out? Same as above. Which kind of App ? Cocoa: Iterate over -[NSWorkspace launchedApplications] Carbon: Use Process Manager API. BSD: use sysctl. http://developer.apple.com/qa/qa2001/qa1123.html _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... Are you taking about Cocoa App, Carbon App, BSD tool ? For Cocoa App, use NSBundle API For Carbon App use CFBundle API (works with Cocoa too) For BSD tool, I think _NSGetExecutablePath() will do the trick (<mach- o/dyld.h>) What do you mean by "find out" ? The simple answer is have a look at activity monitor but you may want to determine it programatically. Thanks in advance. This email sent to site_archiver@lists.apple.com