10

Is there a way to remove "Documents" from protected folders (Controlled folder access) in Windows 10?

I have Controlled folder access feature on, but by default all user's folders are protected - Desktop, Documents, Images and so on. It's not possible to just remove one of users profile folder (particularly Documents) from protected folders list.

I need to remove "Documents" folder from protected list (from protection), because most of my games can't save game right now - saves are stored in Document folder.

As You can see on 2nd screen - there is no remove button for "Document" folder.

Adding app to exclusion is not the solution - doing so is just like turning folder protection off.

I can remove manually added folder

It's not possible to remove "Documents" folder

11
  • Unfortunately, you can't remove the default folders. That's by design, to protect your operating system from something malicious that tries to do the same thing. On the other hand, you can add applications that are allowed to make changes to the Documents folder, including your games.
    – Run5k
    Mar 11, 2018 at 18:45
  • Do you have any source for that info? I know I can add exclusion - but as You understand from my post - I don't want to this. Either way I just could turn off folder protection... Thats not my intention. Mar 12, 2018 at 10:00
  • What exactly does that feature do? I know that I've not had a game that had trouble saving to the documents folder. If they do save to "My Games" you could create a symlink to put that folder somewhere else but it depends on the game.
    – Seth
    Mar 12, 2018 at 10:42
  • "Do you have any source for that info?" My source can be found at the hyperlink within my previous comment. While I can empathize with your frustration, I wouldn't say that "Adding app to exclusion is not the solution - doing so is just like turning folder protection off." Quite frankly, if you could remove Documents from Controlled Folder Access, that is essentially like turning folder protection off, also. From my perspective, the bottom line is this: do you actually trust your games applications? If so, you are willing to grant them additional access, one way or another.
    – Run5k
    Mar 12, 2018 at 11:39
  • 1
    @run5k - I don't trust games so I don't add them to exclusions. I need to remove My Documents from protected folders because games saving game data in MyDocuments folder. D00d - removing only MyDocuments from under protection is not turning entire protection off - what you are talking about? Aug 25, 2018 at 8:05

5 Answers 5

3
+50

What about the Folder Redirection? This will mirror any files and folders from your UserProfile\Documents to different location.

This is simple to achive:

  1. Open 'This PC' in File Explorer (Win+E), right click on your Documents folder, and click on Properties.
  2. Click on the Location tab, and click on the Move button.
  3. Browse to and select the Documents folder at the location (ex: "E:\Documents" ) from step 2, and click on Select Folder
  4. Click on OK to apply.
  5. Click on Yes to move all the files from the old location to the new location
  6. Your personal Documents folder and all of its contents will now be moved to the new location (ex: "E:\Documents" )

Now when your game create any file/folder in default C:\UserProfile\Documents location then those files will be redirected to your new E:\Documents folder

1
  • 1
    I cannot believe this, it works absolutely perfectly! Thank you so much! I redirected my Documents folder to C:/Users/user/3D Objects/Documents, and now apps are accessing my documents directory without tripping the ransomware protection. This is solution is unbelievable painless to do. Thank you again!
    – skillz21
    Sep 6, 2021 at 11:27
2

Since you want :

  • Documents to stay protected, and
  • Games to be able to create sub-folders and files in Documents, while
  • Without creating exceptions for the game programs.

This means that the games must be diverted into using other folders. As most games don't expose such an option, here is a general method that does not need any changes in the game.

I suggest using the free Sandboxie to isolate the game in a sandbox (it's possible to have multiple sandboxes).

This way, while the game thinks it's using the Documents folder, its disk requests are actually being redirected to a sub-folder in C:\Sandbox, so not using any protected folder. This will also simplify uninstalling a game, since emptying the sandbox is enough to wipe out a game with every file and registry change that it ever did.

Installing a game in a sandbox is done by right-click of the installer and using the context-menu option of "Run Sandboxed" to choose the sandbox in which to execute it.

The game won't be able to create icons on the real desktop, so running the game from the sandbox can be done in several ways:

  • Create a real desktop icon via Sandboxie menu Configure > Windows Shell Integration
  • Right-click any file and open it using the context-menu option of "Run Sandboxed"
  • Designing a folder as "always sandboxed" so any program or file opened from it are automatically sandboxed.

Sandboxie has many options to customize the behavior of its sandboxes.

I also use Sandboxie for testing new software or one that I don't trust, since it protects my running system and also much simplifies the uninstallation.


(Previous answer. See comments below as to why it's not very useful.)

There is an undocumented Windows feature for removing a folder from Protected Folders:

  • Run PowerShell as Administrator

  • Enter the following command:

      Remove-MpPreference -ControlledFolderAccessProtectedFolders "C:\Users\USERNAME\Documents"
    

The Remove-MpPreference command does not document the parameter ControlledFolderAccessProtectedFolders, but it still seems to be working.
On my computer Protected Folders is turned off, but this parameter seems to be still accepted by the command. Try it and see. If it works, you might consider removing protection from sub-folders of Documents, rather than the entire folder.

13
  • I tried this, and I don't think it works. When you view the MpPreference list using the following commands in powershell: $Preferences = Get-MpPreference, $Preferences.ControlledFolderAccessProtectedFolders, only the folders that I have added manually are present. This likely means when you run the command you have provided above, nothing happens, because the filepath leading to the documents folder isn't present in the protected folder list in the first place.
    – skillz21
    Aug 30, 2021 at 12:07
  • As this is undocumented, I don't know how well it works. It may need testing to find out.
    – harrymc
    Aug 30, 2021 at 13:30
  • Yes I tested it, and it does not work. Reading the documentation from the link you have provided, the command you have provided likely removes a protected folder path that the user has added. This is because the default protected folder paths (of which, the documents folder is part of) is not part of this list. This list of protected folder paths that this command probably works for can be accessed using the commands in my last comment, or visiting path in regedit: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Windows Defender Exploit Guard\Controlled Folder Access\ProtectedFolders
    – skillz21
    Aug 30, 2021 at 14:12
  • Unfortunate. Is moving the Documents folder an option?
    – harrymc
    Aug 30, 2021 at 14:20
  • Not really an option moving it. The issue of it being a default protected folder is that so many programs use it as their default data save location, meaning having to allow many, many apps through the ransomware guard manually, which is both cumbersome and unsafe.
    – skillz21
    Aug 30, 2021 at 22:42
1

The protected folders feature is a function of Windows Defender Security Center > Virus and threat protection > Ransomware Protection. All you need to do is turn off the Ransomware protection and use another app like Malwarebytes to handle your ransomware concerns.

0

According to this article, you cannot do this. HOWEVER, you can add exceptions for apps that need to write to protected folders via the "Configure allowed applications" (GPO) or "Allow an app through Controlled folder access" (local setting). More information on that in the link above. If this solution does not work in your case, then Controlled Folder Access is too limited to do what you want it to do.

3
  • Did You read all topic? " Adding app to exclusion is not the solution - doing so is just like turning folder protection off." Sep 18, 2018 at 17:59
  • Did you read my response? Because I directly answered your primary question in the first sentence. You asked, "Is there a way to remove "Documents" from protected folders..." I answered, "you cannot do this". I then went on to offer a workaround, not because you asked for it, but because you are not the only person that comes to StackExchange looking for answers. Also, I noticed someone already answered your question with roughly the same answer I gave, and you asked for a source. I at least provided a source directly from Microsoft.
    – Rich
    Sep 19, 2018 at 18:14
  • I dont see any reply in this topic made by "Rich" but this one. Are you using multiple accounts on superuser? And beside of "you cannot do this" - out of box - this does not mean that it cannot be done because You saying that, I think it definitely can be done, but requires some tricks at maybe registry or file level that we don't know yet. I dont like opeple with that attitude - "It cant be done" - sorry... Nov 7, 2018 at 6:26
-2

You don't really want to exclude your Documents folder from the Protected Folders feature---that would defeat its purpose. Ransomware works by encrypting your personal files, and requires you to pay the perpetrators to give you the password to decrypt them. If you're like most people, you keep a fair number of your personal files in your Documents folder.

1
  • 2
    I don't keep ANY of my personal files in MyDocuments becaouse any malicious software target system folder in first place by default. Aug 25, 2018 at 8:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.