PC Review


Reply
Thread Tools Rate Thread

Exporting keys of reg_expand_sz in .reg file

 
 
Henk Hultink
Guest
Posts: n/a
 
      16th Sep 2003
Hi,

As a developer I want to be able to export registry keys
in an editable .reg file. However, when I do this, all the
values of strings of type REG_EXPAND_SZ will appear in
hexadecimal format. This is useless for me. Is there any
way to influence this behavior?
TIA, Henk
 
Reply With Quote
 
 
 
 
Mark V
Guest
Posts: n/a
 
      16th Sep 2003
Henk Hultink wrote in news:096101c37c26$3ca25960$(E-Mail Removed):

> Hi,
>
> As a developer I want to be able to export registry keys
> in an editable .reg file. However, when I do this, all the
> values of strings of type REG_EXPAND_SZ will appear in
> hexadecimal format. This is useless for me. Is there any
> way to influence this behavior?
> TIA, Henk


That's part of the exported REG file format. There may be 3rd-party
tools that can do what you want, but it won't be an "export" and
won't be a "REGEDIT4" or "Windows Registry Editor Version 5.00"
format.

If this format is usable
===================
C:\>reg query HKEY_CURRENT_USER\_TEST

! REG.EXE VERSION 2.0

HKEY_CURRENT_USER\_TEST
SZ REG_SZ string data
X REG_EXPAND_SZ %systemroot%
multi REG_MULTI_SZ line one\0line two\0\0\0
bin REG_BINARY 01010101
dword REG_DWORD 0xff
=====================

that was output from REG.EXE from the Support Tools
(installable from the W2K CD)

 
Reply With Quote
 
Henk Hultink
Guest
Posts: n/a
 
      17th Sep 2003
Hi Mark,

thanks for the answer.
The format in the example you show might be usable, but
can you reload it in the registry after editing? By using
the same tool REG.EXE maybe?


>-----Original Message-----

<cut>
>If this format is usable
>===================
>C:\>reg query HKEY_CURRENT_USER\_TEST
>
>! REG.EXE VERSION 2.0
>
>HKEY_CURRENT_USER\_TEST
> SZ REG_SZ string data
> X REG_EXPAND_SZ %systemroot%
> multi REG_MULTI_SZ line one\0line two\0\0\0
> bin REG_BINARY 01010101
> dword REG_DWORD 0xff
>=====================
>
>that was output from REG.EXE from the Support Tools
>(installable from the W2K CD)
>
>.
>

 
Reply With Quote
 
Mark V
Guest
Posts: n/a
 
      17th Sep 2003
Henk Hultink wrote in news:0b4e01c37cee$86817e80$(E-Mail Removed):

> Hi Mark,
>
> thanks for the answer.
> The format in the example you show might be usable, but
> can you reload it in the registry after editing? By using
> the same tool REG.EXE maybe?


C:\>reg /?

Registry Console Tool For Windows 2000 - version 2.0
Copyright (C) Microsoft Corp. 1981-1999. All rights reserved

REG Operation [Parameter List]

Operation [ QUERY | ADD | DELETE | COPY |
SAVE | LOAD | UNLOAD | RESTORE |
COMPARE | EXPORT | IMPORT ]

Return Code: (Except of REG COMPARE)

0 - Succussful
1 - Failed

For help on a specific operation type:

REG Operation /?

Examples:

REG QUERY /?
REG ADD /?
REG DELETE /?
REG COPY /?
REG SAVE /?
REG RESTORE /?
REG LOAD /?
REG UNLOAD /?
REG COMPARE /?
REG EXPORT /?
REG IMPORT /?



>>-----Original Message-----

> <cut>
>>If this format is usable
>>===================
>>C:\>reg query HKEY_CURRENT_USER\_TEST
>>
>>! REG.EXE VERSION 2.0
>>
>>HKEY_CURRENT_USER\_TEST
>> SZ REG_SZ string data
>> X REG_EXPAND_SZ %systemroot%
>> multi REG_MULTI_SZ line one\0line two\0\0\0
>> bin REG_BINARY 01010101
>> dword REG_DWORD 0xff
>>=====================
>>
>>that was output from REG.EXE from the Support Tools
>>(installable from the W2K CD)
>>
>>.
>>


 
Reply With Quote
 
Henk Hultink
Guest
Posts: n/a
 
      18th Sep 2003
Thanx, i have installed the Windows support tools on my
PC, hoever, using REG EXPORT /nt4 still exports string
values of type REG_EXPAND_SZ in hexadecimal format, and
REQ Query has no "import" possibility. So I'm back where I
started, as I need a way to create editable
and "importable" files. Guess I will look for third-party
solutions now.

>-----Original Message-----
>Henk Hultink wrote in news:0b4e01c37cee$86817e80

$(E-Mail Removed):
>
>> Hi Mark,
>>
>> thanks for the answer.
>> The format in the example you show might be usable, but
>> can you reload it in the registry after editing? By

using
>> the same tool REG.EXE maybe?

>
>C:\>reg /?
>
>Registry Console Tool For Windows 2000 - version 2.0
>Copyright (C) Microsoft Corp. 1981-1999. All rights

reserved
>
>REG Operation [Parameter List]
>
> Operation [ QUERY | ADD | DELETE | COPY |
> SAVE | LOAD | UNLOAD | RESTORE |
> COMPARE | EXPORT | IMPORT ]
>
>Return Code: (Except of REG COMPARE)
>
> 0 - Succussful
> 1 - Failed
>
>For help on a specific operation type:
>
> REG Operation /?
>
>Examples:
>
> REG QUERY /?
> REG ADD /?
> REG DELETE /?
> REG COPY /?
> REG SAVE /?
> REG RESTORE /?
> REG LOAD /?
> REG UNLOAD /?
> REG COMPARE /?
> REG EXPORT /?
> REG IMPORT /?
>
>
>
>>>-----Original Message-----

>> <cut>
>>>If this format is usable
>>>===================
>>>C:\>reg query HKEY_CURRENT_USER\_TEST
>>>
>>>! REG.EXE VERSION 2.0
>>>
>>>HKEY_CURRENT_USER\_TEST
>>> SZ REG_SZ string data
>>> X REG_EXPAND_SZ %systemroot%
>>> multi REG_MULTI_SZ line one\0line two\0\0\0
>>> bin REG_BINARY 01010101
>>> dword REG_DWORD 0xff
>>>=====================
>>>
>>>that was output from REG.EXE from the Support Tools
>>>(installable from the W2K CD)
>>>
>>>.
>>>

>
>.
>

 
Reply With Quote
 
Mark V
Guest
Posts: n/a
 
      18th Sep 2003
Henk Hultink wrote in news:0c1401c37dc2$bd033fa0$(E-Mail Removed):

> Thanx, i have installed the Windows support tools on my
> PC, hoever, using REG EXPORT /nt4 still exports string
> values of type REG_EXPAND_SZ in hexadecimal format, and
> REQ Query has no "import" possibility. So I'm back where I
> started, as I need a way to create editable
> and "importable" files. Guess I will look for third-party
> solutions now.


Pardon me for saying so, but as a developer surely you can either
deal with REGEDIT4 format or use the Win32 APIs directly I would
think.

[ ]

But perhaps you did not see this. Or perhaps it cannot meet your
needs. I know of no way to alter the REG file format and still have
it work with regedit.exe

reg add HKEY_CURRENT_USER\_TEST /t REG_EXPAND_SZ /v Xpand /d %FOO%
The operation completed successfully

reg query HKEY_CURRENT_USER\_TEST /v Xpand
! REG.EXE VERSION 2.0
HKEY_CURRENT_USER\_TEST
Xpand REG_EXPAND_SZ %FOO%

 
Reply With Quote
 
=?Utf-8?B?SGVuayBIdWx0aW5r?=
Guest
Posts: n/a
 
      30th Sep 2003
The problem is, we're dealing with registry keys with subkeys and well over 300 strings with their values.
I can't export them in one file in an editable format, and that's what I want.

But I found a tool that enables me to change the type of a string, and so far this doe not seem to give any problem. So I guess I can do with that. Thanks anyway.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exporting Registry Keys Bob Microsoft Windows 2000 6 25th Sep 2006 02:22 PM
RE: Exporting Private keys Feng Mao Windows XP Internet Explorer 0 10th Aug 2004 05:15 AM
Re: Exporting Private keys choro-nik Windows XP Internet Explorer 1 9th Aug 2004 11:18 PM
Exporting keys of reg_expand_sz in .reg file Henk Hultink Microsoft Windows 2000 Registry Archive 12 30th Sep 2003 05:06 PM
Exporting keys of reg_expand_sz in .reg file Henk Hultink Microsoft Windows 2000 Registry Archive 0 16th Sep 2003 09:43 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:43 AM.