Le 24 août 2009 à 18:35, Kyle Sluder a écrit :

On Mon, Aug 24, 2009 at 6:10 AM, Rick C.<jo_p...@yahoo.com> wrote:
if i can follow up please about authorization services i just want to be sure i'm on the right track. if i'm just trying to do a simple movePath but i don't have access is the only way to get access by using authorizationExecuteWithPrivileges? i keep reading about how i should avoid it if possible. i have followed authorizing in a simple self-restricted application according to the docs but i don't really see what i can do after i get authorization...maybe i'm missing something? i guess i'm just looking for confirmation if i must use authorizationExecuteWithPrivileges or not, and if so can i control the timeout because the docs seem to say it needs authentication every time. thanks again for the help and patience,

Yes, AEWP is what you'll need.  You factor out your "move the file"
code into a helper tool and execute that with AEWP.

Much of the advice about avoiding AEWP is to steer people away from
needlessly elevating their own privileges, and when they do need to do
so ensuring that they take the time to read and understand the sample
code.

You can also ask to the Finder to do it using AppleEvent. The Finder will ask the user its password if needed and will take care of the hard part for you.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to