From 92b7d5fede92799b904c3b83f36e9a775fca6062 Mon Sep 17 00:00:00 2001 From: Alexander Date: Mon, 17 Dec 2018 16:42:08 +0200 Subject: [PATCH] Checking if "shell" section is missing --- Crypto Notepad/SettingsForm.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Crypto Notepad/SettingsForm.cs b/Crypto Notepad/SettingsForm.cs index 3e80424..1df799f 100644 --- a/Crypto Notepad/SettingsForm.cs +++ b/Crypto Notepad/SettingsForm.cs @@ -153,7 +153,9 @@ public static void MenuIntegrate(string action) { if (action == "enable") { - RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Software\Classes\*\shell\", true); + RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Software\Classes\*\", true); + + key = key.CreateSubKey("shell"); key.CreateSubKey("Crypto Notepad").SetValue("icon", appExePath); key.CreateSubKey("Crypto Notepad").SetValue("SubCommands", ""); @@ -177,7 +179,6 @@ public static void MenuIntegrate(string action) { } - } private void panel1_Click_1(object sender, EventArgs e)