IS there any API that can give 'User开发者_StackOverflows' write permission to a file in Vista?
You would want to modify the ACL of the file. For example see related Win32 APIs to: SetNamedSecurityInfo.
If all of that seems a little frightening to you, you can consider simply running a process that calls: cacls
For example giving a directory everyone permission:
cacls "directoryPathHere" /e /t /g Everyone:f
For more information on the command line parameters type in a command prompt:
cacls /?
精彩评论