Answer the question
In order to leave comments, you need to log in
How to save registry values to a file in C#?
I made a small script that gets the names of the values I need:
RegistryKey currentUserKey = Registry.CurrentUser;
RegistryKey SOFTWARE = currentUserKey.OpenSubKey("SOFTWARE", true);
RegistryKey SmartlyDressedGames = SOFTWARE.OpenSubKey("Smartly Dressed Games", true);
RegistryKey Unturned = SmartlyDressedGames.OpenSubKey("Unturned", true);
string[] key_names = Unturned.GetValueNames();
for (int key = 0; key < key_names.Length; key++)
{
string key_name = key_names[key];
string[] savings = { "barricades", "bans", "clothes", "inventory", "lastBackpack", "lastHat", "lastItem", "lastPants", "lastShirt", "lastState", "lastVest", "life", "position", "skills", "structures", "vehicles" };
for (int _saving = 0; _saving < savings.Length; _saving++)
{
string saving = savings[_saving];
if (key_name.StartsWith(saving))
{
Console.WriteLine(key_name);
var subkey = Unturned.OpenSubKey(key_name);
}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question