Junction points in Windows 7

Today I’ve discovered that I’m denied access to several folders in Windows 7. Now, you might be thinking ‘Did you try running Explorer with Administrative privileges?’. Of course I have!

The list of folders that I was denied access to is the following:

 

  • Access to the path ‘C:\Documents and Settings’ is denied.
  • Access to the path ‘C:\ProgramData\Application Data’ is denied.
  • Access to the path ‘C:\ProgramData\Desktop’ is denied.
  • Access to the path ‘C:\ProgramData\Documents’ is denied.
  • Access to the path ‘C:\ProgramData\Favorites’ is denied.
  • Access to the path ‘C:\ProgramData\Microsoft\WwanSvc\Profiles’ is denied.
  • Access to the path ‘C:\ProgramData\Start Menu’ is denied.
  • Access to the path ‘C:\ProgramData\Templates’ is denied.
  • Access to the path ‘C:\RRbackups’ is denied.
  • Access to the path ‘C:\System Volume Information’ is denied.
  • Access to the path ‘C:\Users\<username>\AppData\Local\Application Data’ is denied.
  • Access to the path ‘C:\Users\<username>\AppData\Local\History’ is denied.
  • Access to the path ‘C:\Users\<username>\AppData\Local\Temporary Internet Files’ is denied.
  • Access to the path ‘C:\Users\<username>\Application Data’ is denied.
  • Access to the path ‘C:\Users\<username>\Cookies’ is denied.
  • Access to the path ‘C:\Users\<username>\Documents\My Music’ is denied.
  • Access to the path ‘C:\Users\<username>\Documents\My Pictures’ is denied.
  • Access to the path ‘C:\Users\<username>\Documents\My Videos’ is denied.
  • Access to the path ‘C:\Users\<username>\Local Settings’ is denied.
  • Access to the path ‘C:\Users\<username>\My Documents’ is denied.
  • Access to the path ‘C:\Users\<username>\NetHood’ is denied.
  • Access to the path ‘C:\Users\<username>\PrintHood’ is denied.
  • Access to the path ‘C:\Users\<username>\Recent’ is denied.
  • Access to the path ‘C:\Users\<username>\SendTo’ is denied.
  • Access to the path ‘C:\Users\<username>\Start Menu’ is denied.
  • Access to the path ‘C:\Users\<username>\Templates’ is denied.
  • Access to the path ‘C:\Users\All Users\Application Data’ is denied.
  • Access to the path ‘C:\Users\All Users\Desktop’ is denied.
  • Access to the path ‘C:\Users\All Users\Documents’ is denied.
  • Access to the path ‘C:\Users\All Users\Favorites’ is denied.
  • Access to the path ‘C:\Users\All Users\Microsoft\WwanSvc\Profiles’ is denied.
  • Access to the path ‘C:\Users\All Users\Start Menu’ is denied.
  • Access to the path ‘C:\Users\All Users\Templates’ is denied.
  • Access to the path ‘C:\Users\Default\AppData\Local\Application Data’ is denied.
  • Access to the path ‘C:\Users\Default\AppData\Local\History’ is denied.
  • Access to the path ‘C:\Users\Default\AppData\Local\Temporary Internet Files’ is denied.
  • Access to the path ‘C:\Users\Default\Application Data’ is denied.
  • Access to the path ‘C:\Users\Default\Cookies’ is denied.
  • Access to the path ‘C:\Users\Default\Documents\My Music’ is denied.
  • Access to the path ‘C:\Users\Default\Documents\My Pictures’ is denied.
  • Access to the path ‘C:\Users\Default\Documents\My Videos’ is denied.
  • Access to the path ‘C:\Users\Default\Local Settings’ is denied.
  • Access to the path ‘C:\Users\Default\My Documents’ is denied.
  • Access to the path ‘C:\Users\Default\NetHood’ is denied.
  • Access to the path ‘C:\Users\Default\PrintHood’ is denied.
  • Access to the path ‘C:\Users\Default\Recent’ is denied.
  • Access to the path ‘C:\Users\Default\SendTo’ is denied.
  • Access to the path ‘C:\Users\Default\Start Menu’ is denied.
  • Access to the path ‘C:\Users\Default\Templates’ is denied.
  • Access to the path ‘C:\Users\Default User’ is denied.
  • Access to the path ‘C:\Users\Public\Documents\My Music’ is denied.
  • Access to the path ‘C:\Users\Public\Documents\My Pictures’ is denied.
  • Access to the path ‘C:\Users\Public\Documents\My Videos’ is denied.
  • Access to the path ‘C:\Windows\Registration\CRMLog’ is denied.
  • Access to the path ‘C:\Windows\System32\com\dmp’ is denied.
  • Access to the path ‘C:\Windows\System32\config\systemprofile\AppData\Local\Application Data’ is denied.
  • Access to the path ‘C:\Windows\System32\config\systemprofile\AppData\Local\History’ is denied.
  • Access to the path ‘C:\Windows\System32\config\systemprofile\AppData\Local\Temporary Internet Files’ is denied.
  • Access to the path ‘C:\Windows\System32\config\systemprofile\Application Data’ is denied.
  • Access to the path ‘C:\Windows\System32\config\systemprofile\Cookies’ is denied.
  • Access to the path ‘C:\Windows\System32\config\systemprofile\Local Settings’ is denied.
  • Could not find a part of the path ‘C:\Windows\System32\config\systemprofile\SendTo’.
  • Access to the path ‘C:\Windows\System32\LogFiles\WMI\RtBackup’ is denied.
  • Access to the path ‘C:\Windows\SysWOW64\com\dmp’ is denied.
  • Access to the path ‘C:\Windows\SysWOW64\config\systemprofile\AppData\Local\Application Data’ is denied.
  • Access to the path ‘C:\Windows\SysWOW64\config\systemprofile\AppData\Local\History’ is denied.
  • Access to the path ‘C:\Windows\SysWOW64\config\systemprofile\AppData\Local\Temporary Internet Files’ is denied.
  • Access to the path ‘C:\Windows\SysWOW64\config\systemprofile\Application Data’ is denied.
  • Access to the path ‘C:\Windows\SysWOW64\config\systemprofile\Cookies’ is denied.
  • Access to the path ‘C:\Windows\SysWOW64\config\systemprofile\Local Settings’ is denied.
  • Could not find a part of the path ‘C:\Windows\SysWOW64\config\systemprofile\SendTo’.

As you’ve probably already figured it out, the list contains also the special folders from the 64bit environment that aren’t accessible.

The thing is, as it appears, that these aren’t actual folders, but so-called junction points, created to offer backward compatibility with other operating systems (Vista, XP…).

Now, if you might have been able to see them in Vista (as shortcuts), and access them (which would have redirected you to the actual folders), there is a small glitch in Seven: you don’t see them, not even as shortcuts, and if you try to manually insert these folder paths and open them, instead of being redirected to the actual folders, you’ll get an error saying that access is denied. Honestly, I would have liked to get an ‘path does not exist’ or something similar.

So, how did I get this list? Well, I ran a folder-listing application I’ve written in .NET Framework, and the GetDirectories() method returned these folders as sub-folders of their parents (sounds fishy :)).

So here’s the thing with backward compatibility:

  1. you have an app that does some IO ops in the special environment folders
  2. the .NET Framework returns these special folders as existing
  3. you run your app with elevated privileges to make sure no errors occur
  4. boom, you get an access denied error on some special folders that don’t actually exist.

Is it just me, or is there a glitch somewhere?

P.S.: more about junction poins here: http://www.svrops.com/svrops/articles/jpoints.htm

3 thoughts on “Junction points in Windows 7

  1. Steven J Armstrong says:

    Alex this is very interesting. However, is there a way to access an old C: hard drive from Vista. That is now an external drive on windows 7. The jucntion points I can not access to look at My pictures from this old drive? Do you no of a way to get access to this folder?

  2. Steven J Armstrong says:

    Sorry I am not sure how your site works..

  3. alexmang says:

    Steven, could you please detaile a little? Are you trying to access them via a programming language or PowerShell (or maybe using the basic command shell scripts?).

Leave a reply to Steven J Armstrong Cancel reply