I need to deploy an application on computers where CFA is enabled.
The application needs to write files to folders choosen by the user. If the user decides to browse to a folder that is covered by CFA in a save-file-dialog, for example the personal documents folder, this is blocked by the OS – of course. The problem is the crazy message that “the file was not found” and the the little window in the system tray that the application is blocked by CFA. There is a lot of talk about this senseless error message, when the user is going to write a file.
My question is going in another direction. At startup it is easy to check if the folder is under CFA. Than the application can create a meaningful message with advices what the user should do.
This is not possible in the situation of the SaveFileDialog. If you quit the senseless “file not found” message and cancel the dialog you get out of the SaveFileDialog.ShowDialog without the return code DialogResult.OK and you have no information what folder the user browsed in the save-file-dialog. The event SaveFileDialog.FileOk is also not usable. It is thrown after choosing a valid folder and file.
One could say. Just use the windows standard behavior. But I believe the low-expierenced users will have problems to understand what is happening. Since they are not able to find that way to the Ransomware-Protection settings they will state the application is errorneous.
Also you could say: Force the user to allow your application by default. But not any user has an enabled CFA and this users should not confused with a topic that does not address them.
Since this is so basic, does someone have a solution for that dilemma. If the user in a SaveFileDialog browses to a folder covered by the CFA, there should by an application generated message advicing the user what to do to be able to proceed.