public
string ReadRegisterKey()
{
string sPW =
"";
RegistryKey Reg = Registry.CurrentUser.OpenSubKey("Software",
true);
string[] ssNames = Reg.GetSubKeyNames();
sPW = System.Convert.ToString(Registry.GetValue("HKEY_CURRENT_USER\\Software\\foxlink",
"admin", ""));
if (sPW == "") sPW =
"admin";
return sPW.Trim();
}
public bool WriteRegisterKey(string sPW)
{
RegistryKey Reg = Registry.CurrentUser.OpenSubKey("Software", true);
Registry.SetValue("HKEY_CURRENT_USER\\Software\\foxlink", "admin", sPW, RegistryValueKind.String);
return true;
}
沒有留言:
張貼留言