Documents and Settings icon was changed from lock to shortcut


  1. Posts : 2
    Windows 7 64 bit SP1
       #1

    Documents and Settings icon was changed from lock to shortcut


    I don't want to have permission of this folder all I want to due is get it back the way it was to begin with. When I first click on Documents and Setting folder it said access denied right click went to properties ,click on it went to security tab to look at the permission went to advanced button click on it some how I did something when I got out of the folder, the folder icon no longer had a lock but a shortcut on it. When I went back into properties the next time and to security tab it no longer had the same information. On the screen was Objet Name C:/Documents and Settings info icon that said "You do not have permission to view or edit the object's permission settings". When you click on the advanced button lower right corner Three of the four tab which are Permissions, Auditing, Effective Permissions have the same info icon with the same sentence. The Owner tab screen has the Object name C:/Documents and Settings.
    current owner which says "Unable to display current owner" Change owner to section has "Administrators (name of Pc\Administrators) and on the second line it has my name(name of the Pc\my name).
    I did a restore before this happened and it didn't take of the problem. I'm able to solve this on my own I would appreciate some help.
      My Computer


  2. Posts : 5,642
    Windows 10 Pro (x64)
       #2

    This is pretty easy to fix. Delete "Documents and Settings" nothing uses it anymore. Any software that needs it would most likely not run in the first place.
      My Computer


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

    Copy and paste the following script in to a .bat file and run. Delete the script when done.

    Code:
    @echo off
    net session >NUL 2>&1|| powershell Start-Process '%0' -Verb RunAs&& exit /b|| exit /b
    set "target=C:\Documents and Settings"
    takeown /f "%TARGET%"
    icacls "%TARGET%" /inheritance:r
    for /f "delims=" %%I in (' 
    	powershell "((Get-Acl '%TARGET%').access | foreach {$_.identityreference.value})" 
    ') do icacls "%TARGET%" /remove "%%I"
    icacls "%TARGET%" /grant "NT AUTHORITY\SYSTEM:(F)" "BUILTIN\Administrators:(F)" "Everyone:(RX)" /deny "Everyone:(S,RD)"
    icacls "%TARGET%" /setowner "NT AUTHORITY\SYSTEM"

    As for the lock icon on the folder ("C:/Documents and Settings" is actually a junction), right-click > Share with > Nobody.


    Logic's suggestion above works equally as well too.
      My Computer


  4. Posts : 2
    Windows 7 64 bit SP1
    Thread Starter
       #4

    Problem solved


    I appreciate both of you answer my question extremely fast. I went with the batch file method because I like to have things back the way they started. Again thank you
      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 17:06.
Find Us