changed the logic of the "Associate with *.cnp files" function

This commit is contained in:
Alexander 2018-12-17 12:59:31 +02:00
parent 72dac3cfa3
commit eefc16d0f5
2 changed files with 4 additions and 2 deletions

View file

@ -407,6 +407,8 @@ private void MainWindow_Load(object sender, EventArgs e)
}
sendTo();
}
if (args.Contains("/o")) /*decrypt & open cnp*/
{
openAsotiations();
}

View file

@ -112,7 +112,7 @@ public static void AssociateExtension(string applicationExecutablePath, string e
key = key.CreateSubKey("Shell");
key.SetValue(string.Empty, "Open");
key = key.CreateSubKey("Open");
key.CreateSubKey("Command").SetValue(string.Empty, "\"" + applicationExecutablePath + "\" \"%1\"");
key.CreateSubKey("Command").SetValue(string.Empty, "\"" + applicationExecutablePath + "\" \"%1\" /o");
key.CreateSubKey("ddeexec\\Topic").SetValue(string.Empty, "System");
}
catch (Exception)
@ -120,7 +120,7 @@ public static void AssociateExtension(string applicationExecutablePath, string e
}
}
public static void DissociateExtension(string applicationExecutablePath, string extension)
{
try