views:

508

answers:

3

Hi All,

I am looking for a Python API (or a C API as I am willing to bind) for editing Windows registries from XP to 7 from within a Linux system.

The Windows target will be a mounted volume under Linux.

I would be willing to code a library if none exists. Therefore, any docs or internals on the registry would be handy too.

Any help, much appriciated.

A: 

I think you are out of luck, as I couldn't find any such lib. when I need such thing some years back(to change a windows image file). Also writing it yourself isn't easy and I also couldn't find any MS document describing the format.

here are some links which come up in google search and describe format partially http://www.sentinelchicken.com/research/registry%5Fformat/ http://home.eunet.no/pnordahl/ntpasswd/WinReg.txt

Anurag Uniyal
+1  A: 

You may want to have a look at this project. The initial idea was to recover passwords but all the tools are there to edit registry entries.

It sounds like a dangerous idea though, I would rather find a way to launch a Python script - even remotely - with _winreg in its own environment but it doesn't seem to be a possibility for you. Note also that I didn't see any mention of Windows 7 in their project.

RedGlyph
+1 Will check the source out
Aiden Bell
+4  A: 

OK, so you're after a hive file editor?

I wrote a winregistry module that does this (for both NT and win9x hives). It's not really ready for the public but worked quite well with the data I was using at the time. I'm not sure what state I left it in and I haven't tested it with Win7 hives, but maybe we could get it fixed up for release? If you're interested I could probably dump it in a source control somewhere to work on.

The document I worked from was ntpasswd's well-known WinReg.txt, however I found many flaws in it (can also chuck you my annotations on that). Since then these documents have been produced, which at first glance may cover matters better.

bobince
Some impressive work you have done there! :-)
RedGlyph
+1 and I would be very interested
Aiden Bell
OK, will also post here when we've got something!
bobince