Mike Driscoll wrote:
We're doing what amounts to a registry session audit here at work, so I need to walk a specific set of subfolders in our registry and get the contents thereof. The subfolders will vary from user to user. I found Tim Golden's excellent registry walking script on his website here:

http://timgolden.me.uk/python-on-windows/programming-areas/registry/walk-the-registry.html

My problem is that I need to output the data into *.reg files. Is there a builtin way to do that with _winreg or PyWin32 or do I just need to roll my own?

Try as I might, I was unable to discover an API to do this. The
backup/restore APIs create opaque binaries. Shouldn't be too hard
to get a simple version up-and-running, but picking up all the nuances
of different data types might be a bit tedious[*]. If you decide to do
something and get it running, please do post it back. I have a
long-in-gestation winsys package:

http://winsys.googlecode.com/svn/trunk

which has a registry module
which could do with such a routine. I had thought about writing
it myself but considered it low priority. I'm hoping that once
I get this -- frankly enormous -- package out with docs & tests
I'll be able to feed the best bits of it, and of my own experience,
back into the docs you reference above which have been sadly
neglected.

TJG

[*} One note which I remember: the .reg files are usually UTF16LE;
not sure if that's important or not.
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to