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:
I have totally no idea where to start, can someone help me out? Thanks! :D
can you use AuthorizationExecuteWithPrivileges()
See here for an example and here for the full code to 'OSXSlightlyBetterAuth'.