Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Save registry to file
#1
Hi again,

i want to save to a file a program registry key, and did not find a way to do it directly from QM
I must use this to achieve it:

run "C:\windows\regedit.exe" F"/e ''{Lieu}\{_s}.reg'' HKEY_CURRENT_USER\Software\MyProgramKeys" "" "" 16|0x10400;

and i get a file named 03.08.2013 à 08.50.34.907.reg (_s is a date and time variable)

How to change the code to do the same thing inside the function without regedit.exe use?

Thanks
#2
There are no API or QM functions to export/import registry keys in REG file format.
RegSaveKeyEx uses binary format. Does not work if QM process is not admin, etc.

Attached QM functions to export/import in XML file format.

FUNCTIONS:
RegExportXml
RegImportXml


Attached Files
.qml   Registry export import XML.qml (Size: 3.3 KB / Downloads: 420)
#3
OK, will test but I never used xml functions, i'm totally new to it.

I do want to use a reg file because I use that file to restore the program registry keys when needed to.

Will the xml functions you gave me able to restore keys?
#4
Yes, RegImportXml restores.
#5
Yes, works beautifully, only found I *must* delete the previous key totally before restoring,
using rset function. Thanks


Forum Jump:


Users browsing this thread: 2 Guest(s)