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 的私有注册表配置单元
基础教程推荐
- C# 从 List<List<int>> 中删除重 2022-01-01
- Azure Functions:CosmosDBTrigger 未在 Visual Studio 中触发 2022-01-01
- Moq It.Is<>不匹配 2022-01-01
- 如何使用 .Net 检查 Active Directory 服务器是否已启动并正在运行? 2022-01-01
- 我应该在后面的代码中直接使用 Linq To SQL 还是使 2022-01-01
- 禁止输入少量字符,例如'<'、'&a 2022-01-01
- .NET SerialPort DataReceived 事件未触发 2022-01-01
- WPF 模态进度窗口 2022-01-01
- 当值可以是对象或空数组时反序列化 JSON 2022-01-01
- 如果有人提交恶意软件Nuget包怎么办? 2022-01-01
