Regedit output to STDOUT / force registry files sync
thestig at google.com
Tue Mar 20 17:29:22 CDT 2007
On 3/20/07, Vit Hrachovy <vit.hrachovy at sandbox.cz> wrote:
> 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.
I guess regedit /E - is "unixy" and at the same time non-intrusive.
Right now it creates a file named '-', but that can be easily fixed.
(On Windows XP it gives an error even though '-' is a valid filename)
More information about the wine-devel