Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions RunCat365/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public RunCat365ApplicationContext()

private static Theme GetSystemTheme()
{
var keyName = @"Software\Microsoft\Windows\CurrentVersion\Themes\Personalize";
var keyName = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize";
using var rKey = Registry.CurrentUser.OpenSubKey(keyName);
if (rKey is null) return Theme.Light;
var value = rKey.GetValue("SystemUsesLightTheme");
Expand All @@ -115,7 +115,7 @@ private static Theme GetSystemTheme()

private static bool GetStartup()
{
var keyName = @"Software\Microsoft\Windows\CurrentVersion\Run";
var keyName = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Run";
using var rKey = Registry.CurrentUser.OpenSubKey(keyName);
if (rKey is null) return false;
var value = (rKey.GetValue(Application.ProductName) is not null);
Expand All @@ -127,7 +127,7 @@ private static bool ToggleStartUp(bool isChecked)
{
var productName = Application.ProductName;
if (productName is null) return false;
var keyName = @"Software\Microsoft\Windows\CurrentVersion\Run";
var keyName = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Run";
using var rKey = Registry.CurrentUser.OpenSubKey(keyName, true);
if (rKey is null) return false;
if (isChecked)
Expand Down