Can't Change Documents Folder Out of Read-Only

Page 2 of 2 FirstFirst 12

  1. Posts : 7
    Windows 10 64 bit
    Thread Starter
       #11

    Here is a screen cap of File Explorer...

    Can't Change Documents Folder Out of Read-Only-2-users.jpg

    wiganken: I don't know which one is "wrong". As I delve down into the Picture, Documents, etc folders under the Users folders, none have the correct files. Only the ones directly under ThisPC do.
      My Computer


  2. Posts : 3,643
    Windows 11 Pro 64 Bit 21H2
       #12

    Set your User folder to default Location. Restore Default Location of Personal Folders in Windows 10
      My Computer


  3. Posts : 7
    Windows 10 64 bit
    Thread Starter
       #13

    spunk said:
    Set your User folder to default Location. Restore Default Location of Personal Folders in Windows 10
    OK, I followed the instructions and pointed the Documents folder back to the C: drive and that seems to work. However, I am not giving up on getting the Documents folder off the C; drive. So, I figured with the restore, I would rename the Documents folder on the D; drive (no longer being pointed to) and then create a new Documents folder and point to that. The D: drive Documents folder is still RO and it will not let me change the name. Whenever it says I need Administrator permission to change it and gives me the button to do so, it comes back to yet another window saying I need from permission user S-1-5-21-3464356934-1000016440-1913297077-1000 to do so. Scratching my head on this on.
      My Computer


  4. Posts : 958
    Microsoft Windows 10 Home
       #14

    shell:UserProfiles in the Explorer Address Bar or a Run dialog will open the folder Windows has designated as your "true" Users folder.

    Whenever you see identilcally named folders within the same folder, which isn't possible at the file-system level, your dealing with a trick of the Windows Shell. System folders have Language-version-specific display names while the actual file-system names remain in English (for the sake of languge-independant code). This is acomplished via a desktop.ini file within the folder:
    Attachment 283727
    For the Shell to look for a desktop.ini file & apply the customizations, the folders Read-Only Attribute (or System Attribute, but when tho OS customizes a fodler, it uses the Read-Attribute) must be set:
    Attachment 283729
    So if you have two Users folders, it's because somehow a folder other than Users acquired the desktop.ini file from the Users folder.

    To sort this out:
    • open both folders in Explorer
    • Shift+Right-click in the window background & select Open PowerShell window here
    • The prompt will be displaying the true file-system path & name of the folder
    • In the folder that is not named Users, execute the following PowerShell:


    Code:
    ri desktop.ini -force
    
    (gi .).Attributes -= 'ReadOnly'
    The folder will now display its true name in Explorer.
      My Computer


  5. Posts : 7
    Windows 10 64 bit
    Thread Starter
       #15

    KeithM said:
    shell:UserProfiles in the Explorer Address Bar or a Run dialog will open the folder Windows has designated as your "true" Users folder.

    Whenever you see identilcally named folders within the same folder, which isn't possible at the file-system level, your dealing with a trick of the Windows Shell. System folders have Language-version-specific display names while the actual file-system names remain in English (for the sake of languge-independant code). This is acomplished via a desktop.ini file within the folder:
    Attachment 283727
    For the Shell to look for a desktop.ini file & apply the customizations, the folders Read-Only Attribute (or System Attribute, but when tho OS customizes a fodler, it uses the Read-Attribute) must be set:
    Attachment 283729
    So if you have two Users folders, it's because somehow a folder other than Users acquired the desktop.ini file from the Users folder.

    To sort this out:
    • open both folders in Explorer
    • Shift+Right-click in the window background & select Open PowerShell window here
    • The prompt will be displaying the true file-system path & name of the folder
    • In the folder that is not named Users, execute the following PowerShell:


    Code:
    ri desktop.ini -force
    
    (gi .).Attributes -= 'ReadOnly'
    The folder will now display its true name in Explorer.
    Thanks KeithM! Sorry for the noob question but how do I run that code in PS? I copy and pasted your code into a text file and renamed the file with a .bat extension, then ran the bat file in PS and got the following error:

    C:\Users_Orig>ri desktop.ini -force
    'ri' is not recognized as an internal or external command,
    operable program or batch file.
    .Attributes was unexpected at this time.
    C:\Users_Orig>(gi .).Attributes -= 'ReadOnly'

    As you can see, the second Users folder is actually named Users_Orig, but I don't know enough about PS to know how to run your code correctly.
      My Computer


  6. Posts : 958
    Microsoft Windows 10 Home
       #16

    Shift+RIght-click in the folder background should offer the option to Open PowerShell window here:
    Can't Change Documents Folder Out of Read-Only-screenshot-781-.png

    Then just paste the code directly into the console --- no need for a file (FYI - PowerShell script files have an extension of .ps1)

    If for some reasonPowerShell isn't a Context Menu option, you can open a PowerShell console from the WinX menu.
      My Computer


  7. Posts : 7
    Windows 10 64 bit
    Thread Starter
       #17

    <Sigh> I hate to keep posting failures, especially with all you fine folks trying to assist, but...

    I just hope I don't have to resort to the nuclear option: re-install Windows from scratch. Kinda ridiculous I would even have to contemplate such a thing for a stupid permissions problem, but it has crossed my mind.

    EDIT: Sorry! Scratch all that, I did get your code to work. I just needed to run PS as Admin. Sorry for the image below, I don't know how to delete an attachment. I tried Manage Attachments, but all it seemed to have was different ways to add an attachment, not delete one. Yes I am pretty dense.


    Unfortunately I am still back to the original problem. After I fixed the "double users" problem, I still can't save or change permissions of the Documents folder on the D drive. Incidentally, I did the same thing to the Downloads folder (point to D drive) and it works perfectly fine. I can read, and save just like normal.
    Attached Thumbnails Attached Thumbnails Can't Change Documents Folder Out of Read-Only-powershellfail.jpg  
      My Computer


 

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

Designer Media Ltd
All times are GMT -5. The time now is 22:12.
Find Us




Windows 10 Forums