How to manage folder option using C # or registry

I am developing a C # application and I need to enable / disable the Hide protected system files option in the folder settings via C #. It would also be useful to know what changes have been made to the registry when I check or uncheck the box in the Folder Options dialog box.

+5
source share
1 answer

For current user:

using Microsoft.Win32;

...

const string keyName = @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced";
int enabled = 1; // 0 to disable
Registry.SetValue(keyName, "ShowSuperHidden", enabled, RegistryValueKind.DWord);
+3
source

All Articles