Access Visual Studio 2017#39;s private registry hive(访问 Visual Studio 2017 的私有注册表配置单元)
问题描述
Visual Studio 使用私有注册表配置单元而不是污染"系统注册表 - 通常可以在这样的地方找到:
Visual Studio uses a private registry hive instead of "polluting" the system registry - typically found somewhere like this:
C:UsersAbxAppDataLocalMicrosoftVisualStudio15.0_4b0ba1c0privateregistry.bin
[为了确定已安装的扩展,我们需要查看以下键:SoftwareMicrosoftVisualStudio15.0_4b0ba1c0ExtensionManagerEnabledExtensions]
[In order to determine installed extensions we need to look at the following key:
SoftwareMicrosoftVisualStudio15.0_4b0ba1c0ExtensionManagerEnabledExtensions]
在 C# 中按键加载和访问此文件的最简单方法是什么?
What is the simplest way to load and access this file by key in C#?
推荐答案
要手动查看,您可以使用 regedit.exe 应用程序通过执行以下操作来加载 privateregistry.bin 文件:
To manually review, you can use the regedit.exe application to load the privateregistry.bin file by doing the following:
- 启动 RegEdit.exe
- 在左侧窗格中选择 ComputerHKEY_LOCAL_MACHINE 节点
- 选择文件 |加载 Hive... 菜单项,并加载 privateregistry.bin
- 当提示输入键名时,只需输入类似VSRegHive"的内容
- 这会将数据加载到 HKLM 节点下的 VSRegHive 中
- 完成探索后,请务必选择 VSRegHive 并选择文件 |在退出 RegEdit.exe 实用程序之前卸载 Hive...,否则VS 将无法启动.保持在 regedit 中加载配置单元会创建一些一种阻止 DevEnv.exe 启动的锁.
以编程方式访问密钥 RegLoadAppKey 确实是您最好的选择.
To programmatically access the key RegLoadAppKey is indeed your best bet.
这篇关于访问 Visual Studio 2017 的私有注册表配置单元的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:访问 Visual Studio 2017 的私有注册表配置单元
基础教程推荐
- 如果条件可以为空 2022-01-01
- 在 VB6 或经典 ASP 中使用 .NET 2022-01-01
- 重新排序 WPF TabControl 中的选项卡 2022-01-01
- 更新 Visual Studio 中的 DataSet 结构以匹配新的 SQL 数据库结构 2022-01-01
- 将数据集转换为列表 2022-01-01
- C# 9 新特性——record的相关总结 2023-04-03
- 从 C# 控制相机设备 2022-01-01
- SonarQube C# 分析失败“不是指针的有效行偏移" 2022-01-01
- Mono https webrequest 失败并显示“身份验证或解密失败" 2022-01-01
- 获取C#保存对话框的文件路径 2022-01-01
