[python-win32] Walking the registry and creating reg files

Mike Driscoll mdriscoll at co.marshall.ia.us
Fri Dec 5 17:15:05 CET 2008


Tim Golden wrote:
> <div class="moz-text-flowed" style="font-family: 
> -moz-fixed">Dahlstrom, Roger wrote:
>> If you can read the registry, you can save it without any other 
>> special permissions.  It is just text.
>>
>> Just export a branch of your own registry and open it with notepad to 
>> see the format.  I do it all the time, it works fine.
>
> You're quite right, Roger, and other people earlier in the thread
> have more-or-less suggested this approach. I think Mike was looking
> for something programmatic and there doesn't seem to be anything in
> the API which offers the same output as the Export action gives you
> from the menu.

Yeah, that's what I was looking for. I apologize for not making that 
clearer. Thanks for reading my mind, Tim!

>
> My point about the backup (and later restore) privs refers to the
> specific API calls RegSaveKey and RegRestoreKey. These produce
> an opaque binary format which doesn't look quite so good in notepad. :)
>
> TJG

As I said before, I'll give the export method a try since that's what 
most of the guys have suggested. Then I'll look at writing something 
myself that uses Python rather than subprocess if I can find a moment...

Mike



More information about the python-win32 mailing list