Regedit output to STDOUT / force registry files sync

Vit Hrachovy vit.hrachovy at
Tue Mar 20 16:34:27 CDT 2007

Bill Medland wrote:
> On Tue, 2007-20-03 at 21:12 +0100, Vit Hrachovy wrote:
>> Bill Medland wrote:
>>>> b) Enhance regedit to be able to output to STDOUT. By default registry 
>>>> search output is done to a specified file. It can be redirected to 
>>>> STDERR, though. (tested on 0.9.29, 0.9.33)
>>> c) Use the shell
>>> wine regedit -e /tmp/$$.reg <branch> && cat /tmp/$$.reg && rm -f /tmp/$
>>> $.reg
>> Hi Bill,
>> that's not the case I'm searching for. I'm aware that regedit can export 
>>   into files. I simply want registry export to STDOUT nothing else.
> My point is that the great thing (to me) about unix-like systems is the
> ability to join commands together, which it is why I can write a simple
> statement that will use the existing regedit and two standard unix
> programs (cat and rm) to generate the output on stdout.

Yes, I understand. I simply don't like an idea of generating unnecessary 
file access. I'd prefer data streams and pipes where possible - another 
great unix thing :-)

>> As Lei Zhang mentioned such an application would be useful for more 
>> people than me, I'm going to submit a patch with some sort of new 
>> application [not to break 1 to 1 regedit compatibility] able to output 
>> registry entries to STDOUT.
> You seem to accept the point that we should not add functionality to the
> existing regedit, so that we retain 1-1 compatibility with the Windows
> version.
> However in creating yet another application I suggest you are
> reinventing the wheel.  Either it will use regedit to do the hard work
> (in which case it is equivalent to what I suggested) or else it will
> access the registry itself (in which case it is going to have a lot in
> common with regedit and so you are duplicating functionality and
> accepting the maintenance cost).
> (Can I also suggest that going back to your original idea we could
> accept a filename of - as meaning stdin/stdout, so that we can use
> regedit -e - "HKEY_LOCAL_MACHINE....."
> Then we still have the same arguments as Windows; it's just that we are
> a little more free in what we accept as a filename.  After all, we
> already accept Unix filenames as well as Windows filenames.)

Yes, simple - as a STDOUT would be sufficient. Currently it doesn't work 
in regedit.

That was the main reason I'm asking here on list - I don't want to 
reinvent the wheel and I'd prefer not to support another application to 
do the same job as regedit. I'm trying to find an elegant solution. 
Support for - as STDOUT file name in regedit is an elegant solution and 
will be sufficient to fullfill my desires.

The question to be answered by the dedicated people is whether it is 
acceptable for regedit compatibility issues.


More information about the wine-devel mailing list