Although some Win32 suggestions have been made, if you really do just want to export to a file, a non-perl solution may be easier, from an installation perspective.
The regedit program does have command-line options for this sort of thing, although they are not particularly well-documented in Windows Help. To dump the whole registry to a file, you can use the /e switch followed by a filename, e.g:
regedit /e regdump.txt
Or you can just get a section, by giving the key after the filename:
regedit /e reg.txt "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT"
s^^unp(;75N=&9I<V@`ack(u,^;s|\(.+\`|"$`$'\"$&\"\)"|ee;/m.+h/&&print$&
| [reply] [d/l] [select] |
| [reply] |
I agree with muntfish .
Depending on what you want to do with this reg file, it may be easier to use a system call to regedit.exe . Win32::TieRegistry was usefull to me to modify or read the registry 'in place' , that is on the running system .
That said I never tried Win32::TieRegistry::Dump .
The file produced by a regedit.exe export will be in the UTF-16-LE format (first two bytes : FF FE) which may cause you problem if you want to programatically modify it, before reloading it for example . | [reply] |
If (increasingly unlikely) you are used to Win32::Registry you may try this patch that adds the Export/Import/Load/Unload/FindKey/FindValue/... functionality to the module. If we live long enough to see a new version of libwin32 released it may even become the official version.
Jenda
|
XML sucks. Badly. SOAP on the other hand is the most powerfull vacuum pump ever invented. |
| [reply] |