Description
Bug Report / Discussion
The Pro IDE issue arduino/arduino-pro-ide#179 is caused by a Windows 10 feature called Controlled Folders (see also PowerShell/PowerShell#8857). As a consequence, action is required by users who have this feature active on their Windows installations:
Controlled folder access works by only allowing apps to access protected folders if the app is included on a list of trusted software. If an app isn't on the list, Controlled folder access will block it from making changes to files inside protected folders.
Apps are added to the trusted list based upon their prevalence and reputation. Apps that are highly prevalent throughout your organization, and that have never displayed any malicious behavior, are deemed trustworthy and automatically added to the list.
Apps can also be manually added to the trusted list via SCCM and Intune. Additional actions, such as adding a file indicator for the app, can be performed from the Security Center Console.
(from the Microsoft Docs)
Maybe it would be better to use another user sketch / library directory in the future in order to avoid such hassle, e.g. $HOME\Arduino
instead of $HOME\Documents\Arduino
. However, that would also mean to provide migration utility, e.g. by offering to copy / move the existing sketches and libraries to the new location.
If the user directory stays the same, the CLI and Pro IDE documentation and FAQ should explain how to resolve problems related to Controlled Folders.