Vb.net中,怎么删除HKEY_CLASSES_ROOT下._sln中データ下的值呀?

白白的白豆腐 2019-07-16 10:31:31
只想删除指定字节下的键值,而不删除._sln
...全文
114 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
XBodhi. 2019-07-16
  • 打赏
  • 举报
回复
HKEY_CLASSES_ROOT需要管理员权限。

RegistryKey delKey = Registry.ClassesRoot.OpenSubKey("._sln", true);

delKey.DeleteValue("");

delKey.Close();
threenewbee 2019-07-16
  • 打赏
  • 举报
回复
HKEY_CLASSES_ROOT需要管理员权限。
stherix 2019-07-16
  • 打赏
  • 举报
回复
引用 2 楼 weixin_45407684 的回复:
[quote=引用 1 楼 stherix 的回复:]
RegistryKey delKey = Registry.ClassesRoot.OpenSubKey("._sln", true);

delKey.DeleteValue("");

delKey.Close();
不过默认值可能无法被删除 可以用SetValue把它设为空值
Registrykey Delkey Registry 这三个上,为什么会报错[/quote] using Microsoft.Win32;
白白的白豆腐 2019-07-16
  • 打赏
  • 举报
回复
引用 1 楼 stherix 的回复:
RegistryKey delKey = Registry.ClassesRoot.OpenSubKey("._sln", true);

delKey.DeleteValue("");

delKey.Close();
不过默认值可能无法被删除 可以用SetValue把它设为空值
Registrykey Delkey Registry 这三个上,为什么会报错😨
stherix 2019-07-16
  • 打赏
  • 举报
回复
RegistryKey delKey = Registry.ClassesRoot.OpenSubKey("._sln", true);

delKey.DeleteValue("");

delKey.Close();
不过默认值可能无法被删除 可以用SetValue把它设为空值

16,722

社区成员

发帖
与我相关
我的任务
社区描述
VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
  • VB.NET
  • 水哥阿乐
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧