Junction Points - Restore to Default in Windows

    Junction Points - Restore to Default in Windows

    Junction Points - Restore to Default in Windows

    How to Restore Default Junction Points in Windows
    Published by
    Designer Media Ltd


    How to Restore Default Junction Points in Windows

       Information
    Reparse points are linking mechanisms, comparable to shortcuts, that may be found throughout the Windows 7 file system. The two main types of reparse points are junction points, and symbolic links. Intended mainly for software applications� use, these objects are typically inaccessible by regular users and Windows will produce a �Location not found� error upon attempting to open one.

    The �C:\Documents and Settings� resource is a classic example of a reparse point in Windows 7. Ever since Windows Vista, �Documents and Settings� is no longer a true directory and has been replaced by a junction, linking to the �C:\Users� directory. Ostensibly, these links exist for the purposes of backwards compatibility with programs that access the former locations.

    While shortcut files are simply ordinary files that Windows Explorer treats specially, a reparse point operates almost transparently to most applications, effectively imitating the target object itself. As such, when unwarranted access to these junctions are gained, these advanced links may induce some badly written programs (especially those that scan the file system) into a cyclic reference. This occurs when a reparse point links to a location above itself in a folder hierarchy. For this reason, the permission settings of Windows� default reparse points should never be altered by the user.

    If you are having problems with backup software not completing it may be caused by changed NTFS permissions on a specific junction.

    This tutorial will enable you to repair Windows� default reparse points.

       Note
    As a consequence of file permissions not affecting symbolic links, all default reparse points under Windows are junctions. This is by design.

    Default reparse points are not inherently required for a stable Windows install and may be safely deleted.

    You must have local administrative rights in order to execute the repair scripts included in this tutorial.

    This tutorial supports Windows 8.1 and Windows 10, though note well that some junctions are not available by default in these newer platforms. The scripts in this tutorial do not check your version of Windows check before applying fixes.

    As of later revisions of Windows 10, many default junction points have been depreciated and are absent from a fresh install. Two junctions remain in Windows 10, C:\Users\All Users and C:\Users\Default User.

    The C:\ProgramData\Favorites junction is notably absent from both Windows 8.1 and Window 10.


    CONTENTS:





    OPTION ONE

    View the Current Status of Junction Points


       Note
    If you are unsure of which junction points, if any, have been modified, try the below batch file. This will list out each of the known default junction points and display their current security settings.

    This will not alter any permissions or change any security settings.


    Windows_Default_Junctions_Overview.bat


    Download







    OPTION TWO

    Restore Default Junction Points


       Note
    1. Locate and click the Download button below for the zip that corresponds with the reparse point you'd like to repair.

    2. Save the downloaded file to your Desktop, and unblock it.

    3. If you would like a full restoration of the junction, run only the RepairJunction_<junctionname>.bat script, otherwise,

    4. If you wish to just repair the permissions for the junction, run only the PermissionPackage_<junctionname>.bat file.

    5. After the program is complete you may delete the files.


     1. Restore the Default Documents and Settings Junction

    Junction at "C:\Documents and Settings" linking to "C:\Users".

    RepairJunction_DocumentsAndSettings_win7-win8.zip


    Download


     2. Restore the Default ProgramData\Application Data Junction

    Junction at "C:\ProgramData\Application Data" linking to "C:\ProgramData"

    RepairJunction_ProgramData-ApplicationData_win7-win8.zip

    Download


     3. Restore the Default ProgramData\Desktop Junction

    Junction at "C:\ProgramData\Desktop" linking to "C:\Users\Public\Desktop"

    RepairJunction_ProgramData-Desktop_win7-win8.zip

    Download


     4. Restore the Default ProgramData\Documents Junction

    Junction at "C:\ProgramData\Documents" linking to "C:\Users\Public\Documents"

    RepairJunction_ProgramData-Documents_win7-win8.zip

    Download


     5. Restore the Default ProgramData\Favorites Junction

    Junction at "C:\ProgramData\Favoritesï" linking to "C:\Users\Public\Favorites"

    RepairJunction_ProgramData-Favorites_win7.zip

    Download


     6. Restore the Default ProgramData\Start Menu Junction

    Junction at "C:\ProgramData\Start Menu" linking to "C:\ProgramData\Microsoft\Windows\Start Menu"

    RepairJunction_ProgramData-StartMenu_win7-win8.zip

    Download


     7. Restore the Default ProgramData\Templates Junction

    Junction at "C:\ProgramData\Templates" linking to "C:\ProgramData\Microsoft\Windows\Templates"

    RepairJunction_ProgramData-Templates_win7-win8.zip

    Download


     8. Restore the Default Users\All Users Junction

    Junction at "C:\Users\All Users" linking to "C:\ProgramData"

    RepairJunction_Users-AllUsers_win7-win8.zip

    Download



    RepairJunction_Users-AllUsers_win10.zip

    Download


     9. Restore the Default Users\Default User Junction

    Junction at "C:\Users\Default Users" linking to "C:\Users\Default"

    RepairJunction_Users-DefaultUser_win7-win8.zip

    Download



    RepairJunction_Users-DefaultUser_win10.zip

    Download



    That's all. Got a question, query, suggestion, or recommendation? Please let me know in the section below right away. Enjoy,
    Pyprohly





  1. Posts : 25,847
    Windows 10 Pro. 64/ version 1709 Windows 7 Pro/64
       #1

    HI Pyprohly.

    Is Option 1 only a look and see.
    If I understand correctly, it does not change anything.
    Is that correct??

    Another way to say my desire.
    I would like to see what my permission are set at, compared to what Default setting are.
    I'm not having any problems; I'm just curious.

    Thank you for the long and hard work you are doing. Reading through many threads on this forum I have noticed that many do have problems permission.

    Jack
      My Computer


  2. Posts : 721
    Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
    Thread Starter
       #2

    Yeah, Option One just enables you to view the security settings for the junctions, doesn’t change anything.

    Decided to add it last second. I had used it to identify the junctions I had ruined after doing extensive testing of the batch work.
      My Computer


  3. Posts : 38
    Win 7 Pro 32bit
       #3

    Aloha -
    I humbly thank you for a very interesting [but ultimately confusing] thread here.
    Was fairly new to Win7 until recently. Using Win7 sp1 Pro 32 bit.

    I had recently discovered:
    C:\Users\All Users\Microsoft\Windows\Start Menu\Programs
    and
    C:\ProgramData\Microsoft\Windows\Start Menu\Programs
    were the same. When I added files\folders to one it appeared in the other.

    I then realized that it went back even farther to Start Menu folder.
    After reading your interesting post I realized:
    The entire c:\users\all users & c:\programdata folders are exactly the same!
    I realize you've explained this above but I'm still trying to understand it & left pondering why?!
    What's the exact purpose of the programdata folder? Here's the main reason I ask this:

    I applied a well-known tweak to gain back more of the 'look & feel' of xp's start menu which got rid of 'All Programs' and added a 'Programs' flyout folder on right side of menu under the user profile picture & library links (which I also changed to point to the actual user folders on another partition).
    This 'Programs' folder was actually the above mentioned Programdata....Programs folder.
    At least this is where I had thought it was until the above mentioned discovery of All users Programs.

    Immediately after install, I moved the libraries from C\users\profile name to D\users\profile name\[Docs . . . etc.]
    I also created a PortApps folder in D\users\profile name. I then manually added shortcut from the portapps folder to the programdata...Programs folder. I wanted to see if it would create a 'flyout' menu. When it didn't, i copied the folder instead of linking it to create the menu flyout.
    I later decided to delete that portapps folder from the programdata\Programs folder.
    I was shocked when I discovered that it actually deleted the original PortApps folders on D\users as well?!!

    Fortunately I had backups in place, but not so recent as the System C: Image. It was a shock.
    I even duplicated this phenomena just to make sure it wasn't some kind of fluke.

    Please forgive the length of this to get to these questions:
    1. How could deleting these folders from the programdata folder also delete original folders from D\users\profile name area?
    It was on an entirely different partition and a copy as well.

    2. You have titled these files 'RepairJunction_xxxx'
    How are we to know if these junctions are in need of repairing?
    In other words, what are the logistics of how we are to determine this?
    Is the bat file self explanatory? Could this have something to do with the surprise deletions?

    Since then, I'm extremely leery of messing with that programdata\All users program folder!

    I cannot thank you enough for this info and any further help to understand this.
      My Computer


  4. Posts : 7,097
    W7 home premium 32bit/W7HP 64bit/w10 tp insider ring
       #4

    Hi

    As youve found out the Programdata files are HIDDEN, for a good reason.
    They are classified as NON USER files, bottom line for expert use only.
    Simplistic explanation
    These are the background master files, they also contain licence data files for products, not shown in the programfiles .

    Have you found the others yet

    Roy
      My Computer


  5. Posts : 38
    Win 7 Pro 32bit
       #5

    torchwood said:
    Hi

    As youve found out the Programdata files are HIDDEN, for a good reason.
    They are classified as NON USER files, bottom line for expert use only.
    Simplistic explanation
    These are the background master files, they also contain licence data files for products, not shown in the programfiles .

    Have you found the others yet

    Roy
    Aloha!
    Thank you for the input.

    Not sure what you mean by 'the others', other (no pun intended) than more Junction points?
    I ran 'Set' in cmd prompt and it was quite interesting.

    I'm still not sure exactly what happened with the folders being deleted.
    Could have been 'old-timer's disease' mixed with veteran fallout, or too much Obsidian Stout.

    I've since put only shortcuts in the all users programs folder and nothing like that happened since (yet).

    I'm still wondering how to tell if a repair is needed & what these repair files actually do?
    From reading technet & related articles it appears as though this system is normal.
    Where the programdata folder is hidden I surely can access it, unlike the others mentioned above,
    where I get 'access denied' etc.

    I suppose I should run the initial bat file and see what's up?
    What should I be looking for (in advance)?

    Thanks again m8! :)
      My Computer


  6. Posts : 1
    Windows 7 Home Premium x64 SP1
       #6

    I don't see the permissions package download file, just the repair packages. I have a Windows 10 OS drive (a different PC than mine) that has a bad Application Data junction point that is replicating itself to overrun the name length restriction. I think this issue shut the drive completely down (won't boot or repair by any means but chkdsk can't find any bad sectors) so I only have command prompt access to it. If those batch files you have provided have command prompt syntax in them, I can use them otherwise I am done. I've been stymied by the system every time I try to restore the permissions (assuming that is the problem) and restore that symbolic link to reasonable content. I tried to use the ICACLS command. I discovered this junction link error by using robocopy in backup mode. It found that the Application Data link was infinitely too long. No repair program knows what to do with it including robocopy. I can chuck the whole OS and start over but it has data embedded for my wife's online work so I need to salvage it. One of the problems is the Application Data name with the blank in it. The system doesn't like the word "Data". Mostly this originates with Documents and Settings link to Users App Data directory. In that case the system doesn't like the word "and". Very frustrating!!!
      My Computer


  7. Posts : 1
    windows10 x64
       #7

    Windows 10 Pro, Japanese edition with English langpack.
    None of the scripts work.

    Code:
    Junction created for C:\Users\Default User <<===>> C:\Users\DefaultException calling "Translate" with "1" argument(s): "Some or all identity references could not be translated."At line:74 char:2+     (New-Object System.Security.Principal.NTAccount($user)).Translate ...+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException    + FullyQualifiedErrorId : IdentityNotMappedExceptionInvoke-Expression ([String]::Join([char]10,(Get-Content'C:\Users\Andrey\Downloads\junctionpoints\PermissionPackage_Users-DefaultUser_win10.bat'))) : Error applying SDDLstring to item "C:\Users\Default User". The SDDL may not be valid.    + CategoryInfo          : NotSpecified: (@{Path=C:\Users...A); Action=Set}:PSObject) [Write-Error], WriteErrorExce   ption    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorExceptionPress any key to continue . . .
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 06:04.
Find Us