views:

19

answers:

1

I am writing an application and I am at this point at the workflow:

-File A doesn't exist?
 -Copy file B to file A
  -Error?
   -Copy file B to file A with higher privileges

The problem is in the `Copy file B to file A with higher privileges' step. I am new to asking the admin for his/her password. I'd like a window similar to this, where the admin can enter the password so the file can be copied to an otherwise unwritable location:

fix your image loading...

I have totally no idea where to start, can someone help me out? Thanks! :D

A: 

can you use AuthorizationExecuteWithPrivileges()

See here for an example and here for the full code to 'OSXSlightlyBetterAuth'.

Preet Sangha