简体   繁体   English

从批处理文件中选择其他HDD注册表

[英]Select different HDD registry from a batch file

I've written a simple batch file to make changes to the registry in Windows8, it works as I expected whilst running in Windows8 but now I want to run it from command prompt on a different drive letter. 我已经编写了一个简单的批处理文件来更改Windows8中的注册表,它在Windows8中运行时可以按预期运行,但是现在我想在其他驱动器号上从命令提示符运行它。

Booting in recovery mode on my laptop boots to dirve letter X: which gives me access to the command prompt. 在笔记本电脑上以恢复模式引导时,驱动器将启动字母X:,使我可以访问命令提示符。 I have my batch file on an external pen drive on letter D:. 我的批处理文件存放在字母D:上的外部笔式驱动器上。 I can switch to drive d and run the script but obviously it doesn't know to look on drive letter C: for the registry, I presume it just tries on its current drive letter D:. 我可以切换到驱动器d并运行脚本,但是显然它不知道查找驱动器号C:对于注册表,我想它只是尝试使用当前驱动器号D :。

REGEDIT4

[HKEY_LOCAL_MACHINE\DummyTree]
"Value"="Some String"

The above is a sample of the code im trying to run from the pendrive (drive D:) on the main HDD (drive C:). 上面是一些示例代码,它们试图从主HDD(驱动器C :)上的笔式驱动器(驱动器D :)运行。

您可以尝试在C:驱动器中指定regedit.exe

C:\Windows\regedit.exe /s yourregfile.reg

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM