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

Alec Bennett whatyoulookin at yahoo.com
Fri Dec 5 02:13:29 CET 2008


Reg files are just text files, so why not just create the text files yourself?

Here's a reg file for example:

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Gizmoware\Whatever]

"Name"="Yada"
"Number"="something"





--- On Thu, 12/4/08, Tim Roberts <timr at probo.com> wrote:

> From: Tim Roberts <timr at probo.com>
> Subject: Re: [python-win32] Walking the registry and creating reg files
> To: "Python-Win32 List" <python-win32 at python.org>
> Date: Thursday, December 4, 2008, 6:13 PM
> 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?
> 
> I'm not answering the question you asked, but are you
> aware of the very
> handy "reg" tool included with XP?  "reg
> export" can export a full key
> in a format that is compatible with regedit.
>     reg export
> HKLM\system\CurrentControlSet\Services\vgasave
>  xxx.reg
> 
> -- 
> Tim Roberts, timr at probo.com
> Providenza & Boekelheide, Inc.
> 
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32


      


More information about the python-win32 mailing list