DosTips.com

A Forum all about DOS Batch
It is currently 29 Jun 2016 08:26

All times are UTC-06:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
 Post subject: REG EXPORT REG QUERY???
PostPosted: 07 Aug 2012 22:10 
Offline

Joined: 05 Sep 2011 09:15
Posts: 114
Suppose I've extracted the wanted registry keys:
Code:
@ECHO OFF

REG QUERY HKLM /s /v WakeEnabled


The output:
Quote:
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{36FC9E60-C465-11CF-8056-444553540000}\0009
WakeEnabled REG_DWORD 0x0
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{36FC9E60-C465-11CF-8056-444553540000}\0011
WakeEnabled REG_DWORD 0x0
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Control\Class\{36FC9E60-C465-11CF-8056-444553540000}\0009
WakeEnabled REG_DWORD 0x0
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Control\Class\{36FC9E60-C465-11CF-8056-444553540000}\0011
WakeEnabled REG_DWORD 0x0
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{36FC9E60-C465-11CF-8056-444553540000}\0009
WakeEnabled REG_DWORD 0x0
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{36FC9E60-C465-11CF-8056-444553540000}\0011
WakeEnabled REG_DWORD 0x0
End of search: 6 match(es) found.


But how can I REG EXPORT them into the registry file format?
[/code]
REM obviously I've tried something like this but it seems not the suitable way

FOR /F "tokens=*" %%A IN ('REG QUERY HKLM /s /v WakeEnabled') DO (

)
[/code]


Top
   
PostPosted: 07 Aug 2012 22:44 
Offline
Expert

Joined: 16 May 2011 08:21
Posts: 1433
Location: Flanders(Belgium)
tinfanide wrote:
Suppose I've extracted the wanted registry keys:
Code:
@ECHO OFF

REG QUERY HKLM /s /v WakeEnabled

You can't use the /s option alongside the /v option. You either enumerate regkey/s or a single reg/value.
tinfanide wrote:
But how can I REG EXPORT them into the registry file format?
[/code]
REM obviously I've tried something like this but it seems not the suitable way

FOR /F "tokens=*" %%A IN ('REG QUERY HKLM /s /v WakeEnabled') DO (

)
[/code]
For regKeys use
Code:
reg export "hklm\software\..." regFile
For regVals reg export seems not an option.


Top
   
PostPosted: 08 Aug 2012 00:41 
Offline
Expert

Joined: 10 Feb 2012 02:20
Posts: 5694
reg import works with the exported file, doesn't it?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 posts ] 

All times are UTC-06:00


Who is online

Users browsing this forum: Yahoo [Bot] and 27 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited