aesdtt
asked on
is there a way to programmatically change folder permissions in windows vista?
either with mfc or .net (c++ or c# preferred)
Here's the scenario - I have an MFC dialog app that I am trying to make vista-compatible. I need to be able to write to files in the installpath (and subdirs) at all time, so I figure that i need to give the "Everyone" account full access to the folder. Can I do this with code, or will I need to have the end user change the permissions?
Thanks for any suggestions you can offer!!
Here's the scenario - I have an MFC dialog app that I am trying to make vista-compatible. I need to be able to write to files in the installpath (and subdirs) at all time, so I figure that i need to give the "Everyone" account full access to the folder. Can I do this with code, or will I need to have the end user change the permissions?
Thanks for any suggestions you can offer!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I implemented this code on Vista and it worked well.
But when I tried to set it from the VISTA to a remote folder on an XP computer
\\remotexp\c\folder
It recived an error ACCESS_DENIED (5)
But when I tried to set it from the VISTA to a remote folder on an XP computer
\\remotexp\c\folder
It recived an error ACCESS_DENIED (5)
Sorry, you can't do that remotely this way that easily.
ASKER