开发者

How to control folder option with C# or registry

开发者 https://www.devze.com 2023-03-03 16:20 出处:网络
I am developing a C# Application and开发者_高级运维 I need to enable/disable the Hide protected system files option in folder settings via C#. It would also be useful to know what changes are made in

I am developing a C# Application and开发者_高级运维 I need to enable/disable the Hide protected system files option in folder settings via C#. It would also be useful to know what changes are made in the registry when I check or uncheck that check box in the Folder Options dialog.


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);
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号