简体   繁体   中英

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.

Booting in recovery mode on my laptop boots to dirve letter X: which gives me access to the command prompt. I have my batch file on an external pen drive on letter 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:.

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:).

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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