Windows NT remote registry import

Chris nospam at nospam.org
Fri Oct 4 22:13:55 CEST 2002


Thanks for the info.

I actually need to import a section of the registry that contains 
probably over 200 keys. Importing them one at a time would take a 
substantial amount of code.

Is there a way to merge a .reg file, so I can get the entire group of 
keys at once?



logistix wrote:
>>Can Python import a registry file into a remote Windows NT machine? (I
>>have admin rights over the domain, so that isn't an issue.)
>>
>>If so, can anyone give me an example?
>>
> 
> 
> The win32 extentions list all of the registry functions under the
> win32api module.  You use RegConnectRegistry() to grab a handle to the
> remote registry and then you can use the other Reg* functions to query
> and modify it.
> 
> If you've never edited remote registries before, you'll also want to
> note that the only two "real" root keys are HKEY_LOCAL_MACHINE and
> HKEY_USERS.  HKEY_CLASSES_ROOT is actually an alias to
> HKLM\Software\Classes and HKEY_CURRENT_USER is an alias to an entry
> under HKEY_USERS.  So if you are trying to modify values under these
> keys, you'll need to adjust accordingly.





More information about the Python-list mailing list