On newer versions of Windows C:\Document and Settings
is a junction point, kind of a file system shortcut. It is not a normal directory, which means that it doesn't really work as a normal directory.
If you type in C:\Document and Settings
in the start->run box you will also get an access denied error, so it is nothing specific to your program.
I'm a bit confused by how this works however. I thought that the junction point would be a transparent link to the new location which is c:\users
but obviously not.
Edit
After looking at the duplicate question I'm less confused. The junction point really links to the new location which is c:\users
. However, there is an explicit deny acl for reading on the junction point to prevent anyone from using it to read things:
C:>cacls "Documents and Settings" C:\Documents and Settings
Everyone:(DENY)(special access:)
FILE_READ_DATA
Everyone:R
NT AUTHORITY\SYSTEM:F
BUILTIN\Administrators:F
C:>