如果您在小型企业环境中,如果您不得不走到每台需要修理的计算机前,这会变得非常烦人。相反,如果您可以远程连接并修复问题或调整设置,它会让事情变得更加方便。
虽然不太常见,但有时您可能需要连接到另一台计算机来更改、删除或添加注册表项和值。显然,您可以将桌面远程连接到计算机并执行此操作,但如果您正在阅读本文,您不会走那条路。
在本文中,我将讨论Windows中的远程注册表服务,它允许您使用 regedit 直接连接到另一台计算机上的注册表配置单元。但是,为了使其工作,有几个先决条件。
远程注册表要求
如果您希望连接到您无权访问的远程计算机,那么您就不走运了。为了使用远程注册表(Remote Registry),您基本上需要对两台计算机的管理员访问权限。所以,这基本上是为了方便,不能用来侵入别人的注册表。
在远程注册表工作之前,有几件事必须到位:
- 您要连接的计算机必须有用户名和密码。密码不能为空。
- 两台计算机都需要在防火墙中启用远程管理。(Remote Administration)
- 两台计算机都需要运行远程注册表(Remote Registry)服务。
第一个要求很容易满足。只需(Just)向您的帐户添加密码,如果它还没有密码。可以使用命令提示符修复第二个要求。要打开管理员命令提示符,请单击Start,键入cmd并右键单击 cmd 并选择Run as Administrator。
现在将以下命令复制并粘贴到命令提示符窗口中,然后按Enter。
netsh firewall set service RemoteAdmin
您将收到一条警告消息,表明该命令已成功执行,但不推荐使用 netsh firewall 命令。您将在Windows 7、 Windows 8 或 Windows 10 上收到此消息。只要成功完成就不是问题。请注意,您必须在两台机器上运行此命令。
对于第三个要求,您需要单击Start,输入services然后单击带有两个齿轮图标的Services 。
向下滚动(Scroll),直到您看到远程注册表(Registry),默认情况下它不应该运行。在Windows 10上,默认情况下它实际上会被禁用。在Windows 7上,您只需右键单击它并选择Start。在Windows 10上,您必须先右键单击并选择属性(Properties)。
在属性对话框中,您需要将Startup 类型更改为(Startup type)Disabled以外的其他内容。如果您只需要这样做一次,请将其更改为Manual。如果您需要经常访问远程注册表,请选择Automatic。
选择启动类型后,单击“应用(Apply)”按钮,“启动(Start)”按钮将不再灰显。单击“开始(Start)”以启动远程注册表服务。同样(Again),这需要在两台机器上完成。
连接到远程注册表 Hive
完成上述所有步骤后,您可以尝试连接到远程注册表。单击(Click)开始,键入regedit打开(Start)注册表编辑器。接下来(Next),单击文件(File),然后单击连接网络注册表(Connect Network Registry)。
在这里,您必须输入要连接的计算机的NETBIOS名称。(NETBIOS)
请注意,您可以通过单击高级(Advanced)然后单击立即查找( Find Now)来快速搜索网络上的所有计算机。如果要连接的计算机名称很长,则需要确定计算机的NETBIOS名称。您可以通过在该计算机上打开命令提示符并键入nbtstat -n来执行此操作。
输入名称并单击“确定”后,系统将提示您输入远程计算机上管理员帐户的用户名和密码。
请注意,如果您远程连接到Windows 10计算机并且它使用您的(Windows 10)Microsoft帐户登录,您需要像往常一样键入用户名和密码的电子邮件地址。您应该希望连接到远程计算机上的注册表。如果您收到任何类型的访问被拒绝(Access Denied)消息,这意味着您必须输入错误的凭据。
从上面可以看出,我使用 Windows 10 PC 上的远程注册表连接到Windows 7机器。(Windows 7)当连接到远程注册表时,您只会看到HKEY_LOCAL_MACHINE和HKEY_USERS 。如果您有任何疑问或遇到任何问题,请发表评论,我会尽力提供帮助。享受!
How to Connect to a Remote Registry in Windows 7 and 10
If you’re in a small business enνironment, it can become really annoying if you have to wаlk out to each computer that you need to fix. Instead, if you can remotely connect and fix problems or adjust settings, it mаkes things a lot more convenient.
Though it’s less common, there are times when you might need to connect to another computer to change, delete or add registry keys and values. Obviously, you could remote desktop into the computer and do this, but if you’re reading this article, you aren’t going that route.
In this article, I’m going to talk about the remote registry service in Windows that allows you to connect directly to the registry hives on another computer using regedit. However, in order for this to work, there are several prerequisites.
Remote Registry Requirements
If you’re hoping to connect to a remote computer that you don’t have access to, then you’re out of luck. In order to use Remote Registry, you basically need administrator access to both computers. So, this is basically for convenience and can’t be used to hack into someone else’s registry.
There are a couple of things that have to be in place before remote registry will even work:
- The computer you are connecting to has to have a username and password. The password cannot be blank.
- Both computers need to have Remote Administration enabled in the firewall.
- Both computers need to have the Remote Registry service running.
The first requirement is easy to fulfill. Just go add a password to your account, if it doesn’t already have one. The second requirement can be fixed using the command prompt. To open an administrator command prompt, click on Start, type cmd and right-click on cmd and choose Run as Administrator.
Now copy and paste the following command into the command prompt window and press Enter.
netsh firewall set service RemoteAdmin
You’ll get a warning message that the command executed successfully, but the netsh firewall command is deprecated. You will get this message on Windows 7, Windows 8 or Windows 10. It’s not a problem as long as it completed successfully. Note that you have to run this command on both machines.
For the third requirement, you need to click on Start, type in services and then click on just Services with the two gear icons.
Scroll down till you see Remote Registry and it should not be running by default. On Windows 10, it’ll actually be disabled by default. On Windows 7, you can just right-click on it and choose Start. On Windows 10, you’ll have to right-click and choose Properties first.
In the properties dialog, you need to change the Startup type to something other than Disabled. If you need to do this only one time, change it to Manual. If you need to access the remote registry often, choose Automatic.
After you select the startup type, click the Apply button and then the Start button will no longer be greyed out. Click Start to start the remote registry service. Again, this needs to be done on both machines.
Connect to Remote Registry Hive
Once you have completed all the steps above, you can try to connect to the remote registry. Click on Start, type regedit to open the registry editor. Next, click on File and then click on Connect Network Registry.
Here you will have to type in the NETBIOS name of the computer that you want to connect to.
Note that you can quickly perform a search for all computers on the network by clicking on Advanced and then clicking on Find Now. If the computer you are connecting to has a long name, you’ll need to determine the NETBIOS name for the computer. You can do this by opening a command prompt on that computer and typing in nbtstat -n.
Once you type the name in and click OK, you will be prompted to enter the username and password for an administrator account on the remote computer.
Note that if you are connecting to a Windows 10 machine remotely and it’s logged in using your Microsoft account, you need to type the email address for the username and the password as usual. You should hopefully get connected to the registry on the remote computer. If you get any kind of Access Denied message, it means you must have typed in the credentials wrong.
As you can see from above, I connected to a Windows 7 machine using remote registry from my Windows 10 PC. You’ll only see HKEY_LOCAL_MACHINE and HKEY_USERS when connected to a remote registry. If you have any questions or run into any problems, post a comment and I’ll try to help. Enjoy!