I store (ie. persist) my app's settings in regedit, and want to be able to save them in a file, and restore later.
How can I store everything in a specific regedit node (little yellow folder on the left)?
I store (ie. persist) my app's settings in regedit, and want to be able to save them in a file, and restore later.
How can I store everything in a specific regedit node (little yellow folder on the left)?
There are several ways to do this. You can use regedit.exe to export it to a reg file for backup and use the file for restoring purpose.
Example to export subkeys to a reg file
regedit.exe /e c:\temp\out.reg "HKEY_CURRENT_USER\Software\Microsoft\InputPersonalization"
Or use P/Invoke to call RegSaveKey and RegRestoreKey to do this
https://www.codeproject.com/Articles/7874/%2FArticles%2F7874%2FHow-to-Save-and-Restore-Registry-Keys
Or use .Net Framework Microsoft.Win32.Registry to read and write values to a different file.