开发者

How to control folder option with C# or registry

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜