public static void SetRegistryValue(string Name, object Value, RegistryValueKind Kind) { using (RegistryKey rk = Registry.CurrentUser, rks = rk.OpenSubKey(@"Software\BExplorer", true)) { rks.SetValue(Name, Value, Kind); } }
private void UpdaterWorker_DoWork(object sender, DoWorkEventArgs e) { this._IsCheckUpdateFromTimer = true; Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal, (Action)(() => { autoUpdater.ForceCheckForUpdate(true); })); Utilities.SetRegistryValue("LastUpdateCheck", DateTime.Now.ToBinary(), RegistryValueKind.QWord); LastUpdateCheck = DateTime.Now; }