CreateDirectory and permissions
When I create a directory in Windows 7 using the CreateDirectory function call, the directory that is created does not seem to inherit the permissions of the parent folder/directory. On all other operating systems, I call the create directory function with a null security descriptor and the directory gets created correctly and I can access it. In Windows 7 when I make the same function call the directory gets created but I cannot access it. It gives me a "Access not allowed" error and then when I right click on the folder and view the security, it won't let me view the security even though I am an Administrator. Like I said, this function call works fine in all other Microsoft OSs including Vista, just not with Windows 7.What do I need to do to get this to work?
November 18th, 2009 7:52pm

This behavior is caused by User Account Control. Microsoft Developer Network - User Account Control Regarding software development with UAC, I suggest you refer the following article. Windows Vista Application Development Requirements for User Account Control Compatibility Since this question is related to software development, I suggest you discuss it in our MSDN forum. Microsoft Developer NetworkArthur Xie - MSFT
Free Windows Admin Tool Kit Click here and download it now
November 20th, 2009 11:20am

I have UAC turned off and I am still having the same problems.The reason I posted in this forum is because the msdn moderators told me to post here.
November 23rd, 2009 10:14pm

Does the issue occur when you create new directory in all folders? Does it occur if you manually create a new folder?Arthur Xie - MSFT
Free Windows Admin Tool Kit Click here and download it now
November 25th, 2009 10:32am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics