-1
All,
I apologize, I am not a windows user (not primarily), but I can find my way around under the hood OK. This has me bewildered. I have a 1-user (me) Win7 Pro install that I used create image
(to create a complete image of my drive on an external hard drive -- and created the Recovery CD to boot/reinstall the system on a new drive). It worked fine and everything is working fine -- except for a strange issue regarding the links created to the \Users\All Users
and \Users\Default User
. They point to a non-existent D:\
(it exists -- it is my CD drive, but apparently the external image drive
, or possibly the CD, was labeled D:\
during the image restore). So now the links point to the wrong place. E.g:
C:\Users>dir /a:h
Volume in drive C is Windows
Volume Serial Number is ECC4-9A8B
Directory of C:\Users
07/14/2009 12:08 AM <SYMLINKD> All Users [d:\ProgramData]
07/14/2009 02:07 AM <DIR> Default
07/14/2009 12:08 AM <JUNCTION> Default User [d:\Users\Default]
07/13/2009 11:54 PM 174 desktop.ini
1 File(s) 174 bytes
3 Dir(s) 1,849,542,746,112 bytes free
I generally set the windows explorer view properties to view all system/hidden files (when needed) and to show protected operating system files. So I can take care of tidying up the start menu, etc. as needed. So now when I check the properties of the All Users
and Default User
, they point to D
and are not accessible. Moreover, I cannot edit (or figure out how to edit) the locations to fix the issue.
So my questions are (1) How do I fix the location for the symlinks and junction? and (2) does it really matter? (since Win7 seems happy, but I can foresee it becoming a problem if I ever need to add another user to the system)
Currently I am simply taking care of the start menu through "C:\ProgramData\Microsoft\Windows\Start Menu"
, which works, but I would like to make things right with the system.
Edit (SOLVED) - OK, It was Doable
As listed in the comment, and reprinted here to help some other soul who is not windows centric, the basic approach is:
Use Command Prompt
(as administrator). Navigate to \Users
, then rmdir
on both All Users
and Default User
.
Then create the link and junction:
mklink /D "All Users" C:\ProgramData
mklink /J "Default User" \Users
You then recreate the Special Permissions through the Advanced Security Settings dialog for both.
Disable [ ] Include inherited...
and choose Add
to apply the inherited permissions to the current link/junction).
Under Change Permissions for Everyone
(allow Traverse, List folder, Read attrib, Read extended (all 4 together), and Read permission (toward the bottom)), create (Add
) a second Everyone
and set (deny list/read), then for SYSTEM
grant (all -- individually select allow each), Administrators
grant (all -- same) and you are almost done.
You will need to finish up by setting the attributes on the "All Users"
link and "Default User"
junction as follows:
cd \Users
attrib +H +S +I "All Users" /L
attrib +H +S +I "Default User" /L
That will complete the correct restoration of both, which you can confirm:
C:\Users>dir /a:h
Volume in drive C is Windows
Volume Serial Number is ECC4-9A8B
Directory of C:\Users
03/24/2016 04:50 PM <SYMLINKD> All Users [C:\ProgramData]
07/14/2009 02:07 AM <DIR> Default
03/24/2016 04:43 PM <JUNCTION> Default User [C:\Users\Default]
07/13/2009 11:54 PM 174 desktop.ini
1 File(s) 174 bytes
3 Dir(s) 1,848,337,330,176 bytes free
Thank you, I found the answer the hard way. Basically, you use
Command Prompt
(as administrator) . Navigate to\Users
, thenrmdir
on bothAll Users
andDefault User
. The create the link and junctionmklink /D "All Users" C:\ProgramData
andmklink /J "Default User" \Users
. You then recreate the Special Permissions for both (disable[ ] Include inherited...
) forEveryone
(deny list/read),Everyone
(allow Traverse, List folder, Read attrib, Read extended, Read permission),SYSTEM
(all),Administrators
(all) and you are done. – David C. Rankin – 2016-03-24T22:11:42.747