ProcessInformationCopyDictionary
ProcessInformationCopyDictionary
- Subject: ProcessInformationCopyDictionary
- From: Trygve Inda <email@hidden>
- Date: Wed, 11 Feb 2009 10:43:02 +0000
- Thread-topic: ProcessInformationCopyDictionary
I call
ProcessInformationCopyDictionary
(&psn, kProcessDictionaryIncludeAllInformationMask);
but if the application has moved since it was launched, the result of this
call in the CFBundleExecutable and BundlePath keys is wrong. The values
contain the original location of the application.
So...
NSString *bundlePath = [dict objectForKey:@"BundlePath"];
if (bundlePath)
{
bundle = [NSBundle bundleWithPath:bundlePath];
}
Does not work.
How can I get the real current location of a file from the Process Serial
Number?
I need to do this because my app is a system pref pane and when one installs
a pref pane over the top of an existing one, the existing one is
automatically moved to a tmp location by System Preferences. I need to
determine if the running helper app is a different version form the one
being installed... And need to get at the help app's bundle.
I suppose I could assume that if I can't obtain a real location for the
running helper app, that it has been moved and I should send a quit
AppleEvent to it, but this doesn't seem like the best way.
Any ideas?
Thanks,
Trygve
_______________________________________________
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