private static void ShowInstalledShortcutInfoToast() { try { RegistryKey registryKey = Registry.CurrentUser.CreateSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Notifications\\Settings\\com.squirrel.XIVHunt.XIV-Hunt", true); registryKey.SetValue("ShowInActionCenter", 1, RegistryValueKind.DWord); registryKey.Close(); ToastContent toastContent = new ToastContent { Audio = new ToastAudio { Silent = true }, Visual = new ToastVisual { BindingGeneric = new ToastBindingGeneric { Children = { new AdaptiveText { Text = string.Format(CultureInfo.CurrentCulture, FFXIV_GameSense.Properties.Resources.ToastNotificationAppInstalledShortcut, Program.AssemblyName.Name) } } } } }; XmlDocument xmlDocument = new XmlDocument(); xmlDocument.LoadXml(toastContent.GetContent()); ToastNotification toastNotification = new ToastNotification(xmlDocument); toastNotification.put_ExpirationTime(new DateTimeOffset?(DateTimeOffset.Now.AddHours(6.0))); ToastNotification toast = toastNotification; ToastNotificationManager.CreateToastNotifier("com.squirrel.XIVHunt.XIV-Hunt").Show(toast); } catch (Exception ex) { LogHost.Default.WarnException("Could not show toast.", ex); } }