[python-win32] Walking the registry and creating reg files
timr at probo.com
Fri Dec 5 23:30:16 CET 2008
Dahlstrom, Roger wrote:
> I think my mistake was assuming that reading the values was going to be sufficient. For all the purposes I've used, it was. For my edification, what's the functional difference? I mean, what I was doing was able to walk the registry, extract information, save it for later, modify it, then re-insert it in to the registry. What's different with saving and restoring, or is it just the neater API?
RegSaveKey and RegRestoreKey use a binary format. It's a direct copy of
the database nodes from the registry file itself. RegRestoreKey doesn't
merge the new information with the existing information, like the text
APIs do. Instead, it completely replaces the entire tree being
restored. It's really a backup operation. Thus, these are considered
more dangerous APIs, and that's why these need special privileges.
At least, that's my story, and I'm sticking to it.
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the python-win32