Author Topic: Help Restore Windows 7 Junction Point Attributes  (Read 9611 times)

0 Members and 1 Guest are viewing this topic.

Offline Flaser

  • 210
  • man/fish warsie
Help Restore Windows 7 Junction Point Attributes
Recently, I've finally bit the bullet and moved to Windows 7 on my desktop too... and screwed up my default junciton points.

It'd be invaluable for me, if you could extract and run the atteched cmd script and post the resulting two files (Junc.txt and JuncAttribs.txt) from your desktop here. Beside writing these two files, the script doesn't modify you computer in any shape or fashion.

Background:
One thing that bugged me, was that I couldn't move the "Users" directory to another dirve... until I found an ingenious solution:

http://lifehacker.com/5467758/move-the-users-directory-in-windows-7

Junction Points!

The solution works as advertized... except for a "minor" issue: since you're using robocopy, you'll destroy *all* your old junction points that Windows 7 uses to "mimic" old system directories.

Bummer... At least I was smart enough to list (almost) all the old junction points. Except I didn't store what their attributes were! Recreating the junction poitns by hand is possible, but with the default attributes, they'll cause programs to go into infinite loops due the junctions self-referential nature.

http://www.terabyteunlimited.com/kb/article.php?id=554

[attachment deleted by a basterd]
"I was going to become a speed dealer. If one stupid fairytale turns out to be total nonsense, what does the young man do? If you answered, “Wake up and face reality,” you don’t remember what it was like being a young man. You just go to the next entry in the catalogue of lies you can use to destroy your life." - John Dolan

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Help Restore Windows 7 Junction Point Attributes
id do this kinda thing if it wasnt for the fact that i dont want windows and other software to know where i keep my stuff, they tend to put their own stuff there and i have a bunch of folders containing large amounts of unknown data. instead i use the d drive for files that are strictly mine, and is a no fly zone for everything else on the system. where as the user folder on the other hand is reserved entirely for everything else's data, i back it up selected parts of it, things like savegames, photoshop's data, stuff that i cant keep on d:because it would mess up my well laid directory structure.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: Help Restore Windows 7 Junction Point Attributes
http://en.wikipedia.org/wiki/NTFS_junction_point

EDIT: I think I found the difference, from here: http://answers.microsoft.com/en-us/windows/forum/windows_7-files/problems-with-junction-point-corruption-on-w7/3d92b139-df3c-4535-bcfe-042e253aa521 -- the junction points by default have permissions set to "Everyone" = "Access Denied"

EDIT2: This guy shared a script he created to repair them for you: http://pcloadletter.co.uk/2012/03/20/corrupt-windows-7-junction-points/

EDIT3: Yeah you will need SetACL, the program the script uses.  You have to set some pretty funky permissions that aren't supported on the buillt-in Windows icacls utility. Basically, deny Everyone the right to list directory contents on the Junction, or somesuch.


If it helps: (taken from my wife's Win 7 x64 laptop)

List of Junction Points in the Users directory:


Volume in drive C is Richards (: <3
 Volume Serial Number is D2FE-B614

 Directory of c:\users\candace

08/11/2012  01:21 AM    <JUNCTION>     Application Data [C:\Users\Candace\AppData\Roaming]
08/11/2012  01:21 AM    <JUNCTION>     Cookies [C:\Users\Candace\AppData\Roaming\Microsoft\Windows\Cookies]
08/11/2012  01:21 AM    <JUNCTION>     Local Settings [C:\Users\Candace\AppData\Local]
08/11/2012  01:21 AM    <JUNCTION>     My Documents [C:\Users\Candace\Documents]
08/11/2012  01:21 AM    <JUNCTION>     NetHood [C:\Users\Candace\AppData\Roaming\Microsoft\Windows\Network Shortcuts]
08/11/2012  01:21 AM    <JUNCTION>     PrintHood [C:\Users\Candace\AppData\Roaming\Microsoft\Windows\Printer Shortcuts]
08/11/2012  01:21 AM    <JUNCTION>     Recent [C:\Users\Candace\AppData\Roaming\Microsoft\Windows\Recent]
08/11/2012  01:21 AM    <JUNCTION>     SendTo [C:\Users\Candace\AppData\Roaming\Microsoft\Windows\SendTo]
08/11/2012  01:21 AM    <JUNCTION>     Start Menu [C:\Users\Candace\AppData\Roaming\Microsoft\Windows\Start Menu]
08/11/2012  01:21 AM    <JUNCTION>     Templates [C:\Users\Candace\AppData\Roaming\Microsoft\Windows\Templates]
               0 File(s)              0 bytes

 Directory of c:\users\candace\AppData\Local

08/11/2012  01:21 AM    <JUNCTION>     Application Data [C:\Users\Candace\AppData\Local]
08/11/2012  01:21 AM    <JUNCTION>     History [C:\Users\Candace\AppData\Local\Microsoft\Windows\History]
08/11/2012  01:21 AM    <JUNCTION>     Temporary Internet Files [C:\Users\Candace\AppData\Local\Microsoft\Windows\Temporary Internet Files]
               0 File(s)              0 bytes

 Directory of c:\users\candace\Documents

08/11/2012  01:21 AM    <JUNCTION>     My Music [C:\Users\Candace\Music]
08/11/2012  01:21 AM    <JUNCTION>     My Pictures [C:\Users\Candace\Pictures]
08/11/2012  01:21 AM    <JUNCTION>     My Videos [C:\Users\Candace\Videos]
               0 File(s)              0 bytes

     Total Files Listed:
               0 File(s)              0 bytes
              16 Dir(s)  401,424,130,048 bytes free


List of Junction Points on the hard disk:


Volume in drive C is Richards (: <3
 Volume Serial Number is D2FE-B614

 Directory of c:\

07/14/2009  01:08 AM    <JUNCTION>     Documents and Settings [C:\Users]
               0 File(s)              0 bytes

 Directory of c:\old_install
a
07/14/2009  01:08 AM    <JUNCTION>     Documents and Settings [C:\Users]
               0 File(s)              0 bytes

 Directory of c:\old_install\ProgramData

07/14/2009  01:08 AM    <JUNCTION>     Application Data [C:\ProgramData]
07/14/2009  01:08 AM    <JUNCTION>     Desktop [C:\Users\Public\Desktop]
07/14/2009  01:08 AM    <JUNCTION>     Documents [C:\Users\Public\Documents]
07/14/2009  01:08 AM    <JUNCTION>     Favorites [C:\Users\Public\Favorites]
07/14/2009  01:08 AM    <JUNCTION>     Start Menu [C:\ProgramData\Microsoft\Windows\Start Menu]
07/14/2009  01:08 AM    <JUNCTION>     Templates [C:\ProgramData\Microsoft\Windows\Templates]
               0 File(s)              0 bytes

 Directory of c:\old_install\Users

07/14/2009  01:08 AM    <SYMLINKD>     All Users [C:\ProgramData]
07/14/2009  01:08 AM    <JUNCTION>     Default User [C:\Users\Default]
               0 File(s)              0 bytes

 Directory of c:\old_install\Users\All Users

07/14/2009  01:08 AM    <JUNCTION>     Application Data [C:\ProgramData]
07/14/2009  01:08 AM    <JUNCTION>     Desktop [C:\Users\Public\Desktop]
07/14/2009  01:08 AM    <JUNCTION>     Documents [C:\Users\Public\Documents]
07/14/2009  01:08 AM    <JUNCTION>     Favorites [C:\Users\Public\Favorites]
07/14/2009  01:08 AM    <JUNCTION>     Start Menu [C:\ProgramData\Microsoft\Windows\Start Menu]
07/14/2009  01:08 AM    <JUNCTION>     Templates [C:\ProgramData\Microsoft\Windows\Templates]
               0 File(s)              0 bytes

 Directory of c:\old_install\Users\Davi

01/12/2012  11:22 AM    <JUNCTION>     Application Data [C:\Users\Davi\AppData\Roaming]
01/12/2012  11:22 AM    <JUNCTION>     Cookies [C:\Users\Davi\AppData\Roaming\Microsoft\Windows\Cookies]
01/12/2012  11:22 AM    <JUNCTION>     Local Settings [C:\Users\Davi\AppData\Local]
01/12/2012  11:22 AM    <JUNCTION>     My Documents [C:\Users\Davi\Documents]
01/12/2012  11:22 AM    <JUNCTION>     NetHood [C:\Users\Davi\AppData\Roaming\Microsoft\Windows\Network Shortcuts]
01/12/2012  11:22 AM    <JUNCTION>     PrintHood [C:\Users\Davi\AppData\Roaming\Microsoft\Windows\Printer Shortcuts]
01/12/2012  11:22 AM    <JUNCTION>     Recent [C:\Users\Davi\AppData\Roaming\Microsoft\Windows\Recent]
01/12/2012  11:22 AM    <JUNCTION>     SendTo [C:\Users\Davi\AppData\Roaming\Microsoft\Windows\SendTo]
01/12/2012  11:22 AM    <JUNCTION>     Start Menu [C:\Users\Davi\AppData\Roaming\Microsoft\Windows\Start Menu]
01/12/2012  11:22 AM    <JUNCTION>     Templates [C:\Users\Davi\AppData\Roaming\Microsoft\Windows\Templates]
               0 File(s)              0 bytes

 Directory of c:\old_install\Users\Davi\AppData\Local

01/12/2012  11:22 AM    <JUNCTION>     Application Data [C:\Users\Davi\AppData\Local]
01/12/2012  11:22 AM    <JUNCTION>     History [C:\Users\Davi\AppData\Local\Microsoft\Windows\History]
01/12/2012  11:22 AM    <JUNCTION>     Temporary Internet Files [C:\Users\Davi\AppData\Local\Microsoft\Windows\Temporary Internet Files]
               0 File(s)              0 bytes

 Directory of c:\old_install\Users\Default

07/14/2009  01:08 AM    <JUNCTION>     Application Data [C:\Users\Default\AppData\Roaming]
07/14/2009  01:08 AM    <JUNCTION>     Cookies [C:\Users\Default\AppData\Roaming\Microsoft\Windows\Cookies]
07/14/2009  01:08 AM    <JUNCTION>     Local Settings [C:\Users\Default\AppData\Local]
07/14/2009  01:08 AM    <JUNCTION>     My Documents [C:\Users\Default\Documents]
07/14/2009  01:08 AM    <JUNCTION>     NetHood [C:\Users\Default\AppData\Roaming\Microsoft\Windows\Network Shortcuts]
07/14/2009  01:08 AM    <JUNCTION>     PrintHood [C:\Users\Default\AppData\Roaming\Microsoft\Windows\Printer Shortcuts]
07/14/2009  01:08 AM    <JUNCTION>     Recent [C:\Users\Default\AppData\Roaming\Microsoft\Windows\Recent]
07/14/2009  01:08 AM    <JUNCTION>     SendTo [C:\Users\Default\AppData\Roaming\Microsoft\Windows\SendTo]
07/14/2009  01:08 AM    <JUNCTION>     Start Menu [C:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu]
07/14/2009  01:08 AM    <JUNCTION>     Templates [C:\Users\Default\AppData\Roaming\Microsoft\Windows\Templates]
               0 File(s)              0 bytes

 Directory of c:\old_install\Users\Default\AppData\Local

07/14/2009  01:08 AM    <JUNCTION>     Application Data [C:\Users\Default\AppData\Local]
07/14/2009  01:08 AM    <JUNCTION>     History [C:\Users\Default\AppData\Local\Microsoft\Windows\History]
07/14/2009  01:08 AM    <JUNCTION>     Temporary Internet Files [C:\Users\Default\AppData\Local\Microsoft\Windows\Temporary Internet Files]
               0 File(s)              0 bytes

 Directory of c:\old_install\Users\Default\Documents

07/14/2009  01:08 AM    <JUNCTION>     My Music [C:\Users\Default\Music]
07/14/2009  01:08 AM    <JUNCTION>     My Pictures [C:\Users\Default\Pictures]
07/14/2009  01:08 AM    <JUNCTION>     My Videos [C:\Users\Default\Videos]
               0 File(s)              0 bytes

 Directory of c:\old_install\Users\Public\Documents

07/14/2009  01:08 AM    <JUNCTION>     My Music [C:\Users\Public\Music]
07/14/2009  01:08 AM    <JUNCTION>     My Pictures [C:\Users\Public\Pictures]
07/14/2009  01:08 AM    <JUNCTION>     My Videos [C:\Users\Public\Videos]
               0 File(s)              0 bytes

 Directory of c:\old_install\Users\UpdatusUser

02/21/2012  08:21 PM    <JUNCTION>     Application Data [C:\Users\UpdatusUser\AppData\Roaming]
02/21/2012  08:21 PM    <JUNCTION>     Cookies [C:\Users\UpdatusUser\AppData\Roaming\Microsoft\Windows\Cookies]
02/21/2012  08:21 PM    <JUNCTION>     Local Settings [C:\Users\UpdatusUser\AppData\Local]
02/21/2012  08:21 PM    <JUNCTION>     My Documents [C:\Users\UpdatusUser\Documents]
02/21/2012  08:21 PM    <JUNCTION>     NetHood [C:\Users\UpdatusUser\AppData\Roaming\Microsoft\Windows\Network Shortcuts]
02/21/2012  08:21 PM    <JUNCTION>     PrintHood [C:\Users\UpdatusUser\AppData\Roaming\Microsoft\Windows\Printer Shortcuts]
02/21/2012  08:21 PM    <JUNCTION>     Recent [C:\Users\UpdatusUser\AppData\Roaming\Microsoft\Windows\Recent]
02/21/2012  08:21 PM    <JUNCTION>     SendTo [C:\Users\UpdatusUser\AppData\Roaming\Microsoft\Windows\SendTo]
02/21/2012  08:21 PM    <JUNCTION>     Start Menu [C:\Users\UpdatusUser\AppData\Roaming\Microsoft\Windows\Start Menu]
02/21/2012  08:21 PM    <JUNCTION>     Templates [C:\Users\UpdatusUser\AppData\Roaming\Microsoft\Windows\Templates]
               0 File(s)              0 bytes

 Directory of c:\old_install\Users\UpdatusUser\AppData\Local

02/21/2012  08:21 PM    <JUNCTION>     Application Data [C:\Users\UpdatusUser\AppData\Local]
02/21/2012  08:21 PM    <JUNCTION>     History [C:\Users\UpdatusUser\AppData\Local\Microsoft\Windows\History]
02/21/2012  08:21 PM    <JUNCTION>     Temporary Internet Files [C:\Users\UpdatusUser\AppData\Local\Microsoft\Windows\Temporary Internet Files]
               0 File(s)              0 bytes

 Directory of c:\old_install\Users\UpdatusUser\Documents

02/21/2012  08:21 PM    <JUNCTION>     My Music [C:\Users\UpdatusUser\Music]
02/21/2012  08:21 PM    <JUNCTION>     My Pictures [C:\Users\UpdatusUser\Pictures]
02/21/2012  08:21 PM    <JUNCTION>     My Videos [C:\Users\UpdatusUser\Videos]
               0 File(s)              0 bytes

 Directory of c:\ProgramData

07/14/2009  01:08 AM    <JUNCTION>     Application Data [C:\ProgramData]
07/14/2009  01:08 AM    <JUNCTION>     Desktop [C:\Users\Public\Desktop]
07/14/2009  01:08 AM    <JUNCTION>     Documents [C:\Users\Public\Documents]
07/14/2009  01:08 AM    <JUNCTION>     Favorites [C:\Users\Public\Favorites]
07/14/2009  01:08 AM    <JUNCTION>     Start Menu [C:\ProgramData\Microsoft\Windows\Start Menu]
07/14/2009  01:08 AM    <JUNCTION>     Templates [C:\ProgramData\Microsoft\Windows\Templates]
               0 File(s)              0 bytes

 Directory of c:\Users

07/14/2009  01:08 AM    <SYMLINKD>     All Users [C:\ProgramData]
07/14/2009  01:08 AM    <JUNCTION>     Default User [C:\Users\Default]
               0 File(s)              0 bytes

 Directory of c:\Users\All Users

07/14/2009  01:08 AM    <JUNCTION>     Application Data [C:\ProgramData]
07/14/2009  01:08 AM    <JUNCTION>     Desktop [C:\Users\Public\Desktop]
07/14/2009  01:08 AM    <JUNCTION>     Documents [C:\Users\Public\Documents]
07/14/2009  01:08 AM    <JUNCTION>     Favorites [C:\Users\Public\Favorites]
07/14/2009  01:08 AM    <JUNCTION>     Start Menu [C:\ProgramData\Microsoft\Windows\Start Menu]
07/14/2009  01:08 AM    <JUNCTION>     Templates [C:\ProgramData\Microsoft\Windows\Templates]
               0 File(s)              0 bytes

 Directory of c:\Users\Candace

08/11/2012  01:21 AM    <JUNCTION>     Application Data [C:\Users\Candace\AppData\Roaming]
08/11/2012  01:21 AM    <JUNCTION>     Cookies [C:\Users\Candace\AppData\Roaming\Microsoft\Windows\Cookies]
08/11/2012  01:21 AM    <JUNCTION>     Local Settings [C:\Users\Candace\AppData\Local]
08/11/2012  01:21 AM    <JUNCTION>     My Documents [C:\Users\Candace\Documents]
08/11/2012  01:21 AM    <JUNCTION>     NetHood [C:\Users\Candace\AppData\Roaming\Microsoft\Windows\Network Shortcuts]
08/11/2012  01:21 AM    <JUNCTION>     PrintHood [C:\Users\Candace\AppData\Roaming\Microsoft\Windows\Printer Shortcuts]
08/11/2012  01:21 AM    <JUNCTION>     Recent [C:\Users\Candace\AppData\Roaming\Microsoft\Windows\Recent]
08/11/2012  01:21 AM    <JUNCTION>     SendTo [C:\Users\Candace\AppData\Roaming\Microsoft\Windows\SendTo]
08/11/2012  01:21 AM    <JUNCTION>     Start Menu [C:\Users\Candace\AppData\Roaming\Microsoft\Windows\Start Menu]
08/11/2012  01:21 AM    <JUNCTION>     Templates [C:\Users\Candace\AppData\Roaming\Microsoft\Windows\Templates]
               0 File(s)              0 bytes

 Directory of c:\Users\Candace\AppData\Local

08/11/2012  01:21 AM    <JUNCTION>     Application Data [C:\Users\Candace\AppData\Local]
08/11/2012  01:21 AM    <JUNCTION>     History [C:\Users\Candace\AppData\Local\Microsoft\Windows\History]
08/11/2012  01:21 AM    <JUNCTION>     Temporary Internet Files [C:\Users\Candace\AppData\Local\Microsoft\Windows\Temporary Internet Files]
               0 File(s)              0 bytes

 Directory of c:\Users\Candace\Documents

08/11/2012  01:21 AM    <JUNCTION>     My Music [C:\Users\Candace\Music]
08/11/2012  01:21 AM    <JUNCTION>     My Pictures [C:\Users\Candace\Pictures]
08/11/2012  01:21 AM    <JUNCTION>     My Videos [C:\Users\Candace\Videos]
               0 File(s)              0 bytes

 Directory of c:\Users\Default

07/14/2009  01:08 AM    <JUNCTION>     Application Data [C:\Users\Default\AppData\Roaming]
07/14/2009  01:08 AM    <JUNCTION>     Cookies [C:\Users\Default\AppData\Roaming\Microsoft\Windows\Cookies]
07/14/2009  01:08 AM    <JUNCTION>     Local Settings [C:\Users\Default\AppData\Local]
07/14/2009  01:08 AM    <JUNCTION>     My Documents [C:\Users\Default\Documents]
07/14/2009  01:08 AM    <JUNCTION>     NetHood [C:\Users\Default\AppData\Roaming\Microsoft\Windows\Network Shortcuts]
07/14/2009  01:08 AM    <JUNCTION>     PrintHood [C:\Users\Default\AppData\Roaming\Microsoft\Windows\Printer Shortcuts]
07/14/2009  01:08 AM    <JUNCTION>     Recent [C:\Users\Default\AppData\Roaming\Microsoft\Windows\Recent]
07/14/2009  01:08 AM    <JUNCTION>     SendTo [C:\Users\Default\AppData\Roaming\Microsoft\Windows\SendTo]
07/14/2009  01:08 AM    <JUNCTION>     Start Menu [C:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu]
07/14/2009  01:08 AM    <JUNCTION>     Templates [C:\Users\Default\AppData\Roaming\Microsoft\Windows\Templates]
               0 File(s)              0 bytes

 Directory of c:\Users\Default\AppData\Local

07/14/2009  01:08 AM    <JUNCTION>     Application Data [C:\Users\Default\AppData\Local]
07/14/2009  01:08 AM    <JUNCTION>     History [C:\Users\Default\AppData\Local\Microsoft\Windows\History]
07/14/2009  01:08 AM    <JUNCTION>     Temporary Internet Files [C:\Users\Default\AppData\Local\Microsoft\Windows\Temporary Internet Files]
               0 File(s)              0 bytes

 Directory of c:\Users\Default\Documents

07/14/2009  01:08 AM    <JUNCTION>     My Music [C:\Users\Default\Music]
07/14/2009  01:08 AM    <JUNCTION>     My Pictures [C:\Users\Default\Pictures]
07/14/2009  01:08 AM    <JUNCTION>     My Videos [C:\Users\Default\Videos]
               0 File(s)              0 bytes

 Directory of c:\Users\Public\Documents

07/14/2009  01:08 AM    <JUNCTION>     My Music [C:\Users\Public\Music]
07/14/2009  01:08 AM    <JUNCTION>     My Pictures [C:\Users\Public\Pictures]
07/14/2009  01:08 AM    <JUNCTION>     My Videos [C:\Users\Public\Videos]
               0 File(s)              0 bytes

 Directory of c:\Users\UpdatusUser

08/11/2012  02:58 AM    <JUNCTION>     Application Data [C:\Users\UpdatusUser\AppData\Roaming]
08/11/2012  02:58 AM    <JUNCTION>     Cookies [C:\Users\UpdatusUser\AppData\Roaming\Microsoft\Windows\Cookies]
08/11/2012  02:58 AM    <JUNCTION>     Local Settings [C:\Users\UpdatusUser\AppData\Local]
08/11/2012  02:58 AM    <JUNCTION>     My Documents [C:\Users\UpdatusUser\Documents]
08/11/2012  02:58 AM    <JUNCTION>     NetHood [C:\Users\UpdatusUser\AppData\Roaming\Microsoft\Windows\Network Shortcuts]
08/11/2012  02:58 AM    <JUNCTION>     PrintHood [C:\Users\UpdatusUser\AppData\Roaming\Microsoft\Windows\Printer Shortcuts]
08/11/2012  02:58 AM    <JUNCTION>     Recent [C:\Users\UpdatusUser\AppData\Roaming\Microsoft\Windows\Recent]
08/11/2012  02:58 AM    <JUNCTION>     SendTo [C:\Users\UpdatusUser\AppData\Roaming\Microsoft\Windows\SendTo]
08/11/2012  02:58 AM    <JUNCTION>     Start Menu [C:\Users\UpdatusUser\AppData\Roaming\Microsoft\Windows\Start Menu]
08/11/2012  02:58 AM    <JUNCTION>     Templates [C:\Users\UpdatusUser\AppData\Roaming\Microsoft\Windows\Templates]
               0 File(s)              0 bytes

 Directory of c:\Users\UpdatusUser\AppData\Local

08/11/2012  02:58 AM    <JUNCTION>     Application Data [C:\Users\UpdatusUser\AppData\Local]
08/11/2012  02:58 AM    <JUNCTION>     History [C:\Users\UpdatusUser\AppData\Local\Microsoft\Windows\History]
08/11/2012  02:58 AM    <JUNCTION>     Temporary Internet Files [C:\Users\UpdatusUser\AppData\Local\Microsoft\Windows\Temporary Internet Files]
               0 File(s)              0 bytes

 Directory of c:\Users\UpdatusUser\Documents

08/11/2012  02:58 AM    <JUNCTION>     My Music [C:\Users\UpdatusUser\Music]
08/11/2012  02:58 AM    <JUNCTION>     My Pictures [C:\Users\UpdatusUser\Pictures]
08/11/2012  02:58 AM    <JUNCTION>     My Videos [C:\Users\UpdatusUser\Videos]
               0 File(s)              0 bytes

     Total Files Listed:
               0 File(s)              0 bytes
             129 Dir(s)  401,424,134,144 bytes free

« Last Edit: October 23, 2012, 07:32:35 pm by jr2 »

 

Offline Flaser

  • 210
  • man/fish warsie
Re: Help Restore Windows 7 Junction Point Attributes
Thanks for replying jr2!

The list of default junction points from an unmodified system, *is* useful, however what I really need is the default file attributes for them. (A junction can be given attributes, just like a file or directory). The script I posted queries them on by one and writes the result to a text file.

I'm debating whether to write my own batch file, or use the one you linked, it pretty much does what I want to do myself:
1. Delete the old junction point. (There's no way to retarget or repair broken links)
2. Create the new one.
3. Set permissions/attributes.

EDIT: Seems like I should've read robocopy's documentation more thoroughly -
http://technet.microsoft.com/en-us/library/cc733145%28v=ws.10%29.aspx

The /SL switch makes Robocopy copy junctions instead what they link to!

http://answers.microsoft.com/en-us/windows/forum/windows_7-files/how-to-copy-a-directory-with-all-permissions-and/373353a9-7bc2-468e-ac20-04850c105e3f

This won't help me now, but at least in the future there will be way to do the Profile transplant without having to use a long and OS language dependent batch script.
« Last Edit: October 24, 2012, 02:40:58 am by Flaser »
"I was going to become a speed dealer. If one stupid fairytale turns out to be total nonsense, what does the young man do? If you answered, “Wake up and face reality,” you don’t remember what it was like being a young man. You just go to the next entry in the catalogue of lies you can use to destroy your life." - John Dolan

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: Help Restore Windows 7 Junction Point Attributes
Yeah that script I mentioned sets those permissions.  If you read it, you can see how it does that with the SetACL utility.

 

Offline Flaser

  • 210
  • man/fish warsie
Re: Help Restore Windows 7 Junction Point Attributes
It does that for all the default profiles - default, all users, etc. - but I wonder if the permissions are the same for the junctions inside an actual user's folder. A lot of things indicate they are, I just wanna make sure.

...and yes, that script's awesome, it made me realize the "solution" proposed in the guide I linked earlier only gets the job 1/2 done, as it doesn't change the junction owner, nor does it prevents the listing of the linked folder (causing infinite loops in stuff that tries to poll things recursively).

EDIT: managed to fix everything, apparently that guess was right. Since I'm not so good ad batch scripting my version was a lot uglier  :P, but the original script you linked was priceless.

Once again, thanks for your help jr2, it really made a difference.
« Last Edit: October 24, 2012, 01:23:56 pm by Flaser »
"I was going to become a speed dealer. If one stupid fairytale turns out to be total nonsense, what does the young man do? If you answered, “Wake up and face reality,” you don’t remember what it was like being a young man. You just go to the next entry in the catalogue of lies you can use to destroy your life." - John Dolan

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: Help Restore Windows 7 Junction Point Attributes
np; always happy to help! -- glad you got it fixed.  :yes: