On
Windows 7
such an operation is not allowed to standard user code. You have to run your application 'as administrator' or programmatically elevate the application level of execution (there are articles here at
CodeProject
about it, see, for instance:
"Riding the Vista UAC elevator, up and down"[
^]). Or you may, simply, create the folder in a less 'protected' place.