PC Review Forums Newsgroups Windows 2000 Microsoft Windows 2000 Registry Exporting keys of reg_expand_sz in .reg file

Reply

Exporting keys of reg_expand_sz in .reg file

 
Thread Tools Rate Thread
Old 16-09-2003, 09:43 AM   #1
Henk Hultink
Guest
 
Posts: n/a
Default Exporting keys of reg_expand_sz in .reg file


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
Old 16-09-2003, 02:27 PM   #2
Mark V
Guest
 
Posts: n/a
Default Re: Exporting keys of reg_expand_sz in .reg file

Henk Hultink wrote in news:096101c37c26$3ca25960$a401280a@phx.gbl:

> 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
Old 17-09-2003, 09:37 AM   #3
Henk Hultink
Guest
 
Posts: n/a
Default Re: Exporting keys of reg_expand_sz in .reg file

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
Old 17-09-2003, 04:02 PM   #4
Mark V
Guest
 
Posts: n/a
Default Re: Exporting keys of reg_expand_sz in .reg file

Henk Hultink wrote in news:0b4e01c37cee$86817e80$a101280a@phx.gbl:

> 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
Old 18-09-2003, 10:56 AM   #5
Henk Hultink
Guest
 
Posts: n/a
Default Re: Exporting keys of reg_expand_sz in .reg file

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

$a101280a@phx.gbl:
>
>> 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
Old 18-09-2003, 12:48 PM   #6
Mark V
Guest
 
Posts: n/a
Default Re: Exporting keys of reg_expand_sz in .reg file

Henk Hultink wrote in news:0c1401c37dc2$bd033fa0$a301280a@phx.gbl:

> 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
Old 30-09-2003, 05:06 PM   #7
=?Utf-8?B?SGVuayBIdWx0aW5r?=
Guest
 
Posts: n/a
Default Re: Exporting keys of reg_expand_sz in .reg file

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off