First of all, I'm about as new to C# as you can get, so go easy on me.
I'm using Visual Studio 2005 and programming in C#.
I searched the internet high and low to find a simple way to export a
registry key to a .reg file (as if done using regedit.exe/export
function), but what I'm finding is that it is not possible as far as C#
having a method to do so. The only alternatives I can see are using a
batch file to do the exporting (I am currently doing it this way), using
another language to do the exporting (not desirable to me), or readng
each of the keys/subkeys' values and saving to the text (.reg) file that
way. Am I missing something or are these the only alternatives I have?
If it helps, I'm trying to make a back up program (console, not Windows)
to back up certain files, folders, and registry keys as well as download
and save a couple files from online for my own personal use. Right now,
I'm keeping things "simple" and hardcoding the file names/paths/etc.,
but if I can find an easy way to export the registry keys in C#, I'll
elaborate on the program and use a form and add more flexibility to it.
So, if there is a way to easily export a key (such as
HKCU\Software\Microsoft\Windows\CurrentVersion\Run) then please give me
a hint. No direct code samples as I really want to learn this on my
own.
Thank you.
*** Sent via Developersdex
http://www.developersdex.com ***
Leer las respuestas