Understand that this is true said by
Dave-Kreskowiak
You cannot export a single value. You would have to write your own tool to do that
A bat would do that, but use a filter and a temp file:
@echo off
set "_hkey=HKLM\SOFTWARE\Dinesh"
>nul reg export "%_hkey%" "%tmp%\TMPDinesh.reg" /y
>"C:\Temp\Dell_Reg\Dell_Test.Reg" (
type "%tmp%\TMPDinesh.reg" | findstr /v Dinesh.=
)
del /q /f /a "%tmp%\RegExportDinesh.reg"
Output (content) resulting in the file:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Dinesh]
"Test"="Hello"
After exporting and filtering, generating your reg file, then you can import:
Reg import "C:\Temp\Dell_Reg\Dell_Test.Reg"