访问Visual Studio 2017的私有注册表配置单元 [英] Access Visual Studio 2017's private registry hive

查看:159
本文介绍了访问Visual Studio 2017的私有注册表配置单元的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Visual Studio使用专用注册表配置单元,而不是污染系统注册表-通常在以下位置找到:

Visual Studio uses a private registry hive instead of "polluting" the system registry - typically found somewhere like this:

C:\ Users\Abx\AppData\Local\Microsoft\VisualStudio\15.0_4b0ba1c0\privateregistry.bin

[按顺序要确定已安装的扩展,我们需要查看以下键:
软件\Microsoft\VisualStudio\15.0_4b0ba1c0\ExtensionManager\EnabledExtensions ]

[In order to determine installed extensions we need to look at the following key: Software\Microsoft\VisualStudio\15.0_4b0ba1c0\ExtensionManager\EnabledExtensions]

通过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:


  1. 启动RegEdit.exe

  2. 在左侧窗格中选择Computer\HKEY_LOCAL_MACHINE节点

  3. 选择文件|加载Hive ...菜单项,并加载privateregistry.bin

  4. 在提示输入密钥名称时,只需键入 VSRegHive之类的字词

  5. 这会将数据加载到HKLM节点下的VSRegHive中。

  6. 完成探索后,请确保选择VSRegHive并选择
    File |。在退出RegEdit.exe实用程序之前,先卸载Hive ...,否则
    VS将无法启动。保持regedit中的配置单元为中心会创建一些
    的锁定,阻止启动DevEnv.exe。

  1. Launch RegEdit.exe
  2. Select the Computer\HKEY_LOCAL_MACHINE node in the left-hand pane
  3. Select the File | Load Hive... menu item, and load the privateregistry.bin
  4. When prompted for a key name, just type in something like "VSRegHive"
  5. This will load the data into a VSRegHive under the HKLM node
  6. When finished exploring, be sure to select the VSRegHive and select File | Unload Hive... , before exiting the RegEdit.exe utility, otherwise VS will fail to start. Keeping the hive loaded in regedit creates some sort of lock that prevents DevEnv.exe from launching.

以编程方式访问RegLoadAppKey键确实是最好的选择。

To programmatically access the key RegLoadAppKey is indeed your best bet.

这篇关于访问Visual Studio 2017的私有注册表配置单元的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆