38 lines
886 B
C#
38 lines
886 B
C#
using Microsoft.Win32;
|
|
using System;
|
|
|
|
namespace EZPPClient_Installer.Utils
|
|
{
|
|
class RegistryUtil
|
|
{
|
|
|
|
public static void SetUsedReleaseStream(string release)
|
|
{
|
|
RegistryKey key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\EZPPClientInstaller");
|
|
key.SetValue("ReleaseStream", release);
|
|
key.Close();
|
|
}
|
|
|
|
public static String GetUsedReleaseStream(string defaultRelease)
|
|
{
|
|
string release = defaultRelease;
|
|
RegistryKey key = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\EZPPClientInstaller");
|
|
|
|
//if it does exist, retrieve the stored values
|
|
if (key != null)
|
|
{
|
|
release = (string) key.GetValue("ReleaseStream");
|
|
key.Close();
|
|
}
|
|
|
|
return release;
|
|
}
|
|
|
|
public static void DeleteUsedReleaseStream()
|
|
{
|
|
Registry.CurrentUser.DeleteSubKey(@"SOFTWARE\EZPPClientInstaller");
|
|
}
|
|
|
|
}
|
|
}
|