Ejemplo n.º 1
0
        static void RegisterProtocol(string protocol)
        {
            var key = Registry.CurrentUser.CreateSubKey(Path.Combine(Common.AppCommon.Classes, protocol));

            key.SetValue(string.Empty, "URL:Sync withSIX " + protocol + " Protocol");
            key.SetValue("URL Protocol", string.Empty);

            var iconKey   = key.CreateSubKey("DefaultIcon");
            var updateExe = StartWithWindowsHandler.GetUpdateExe(Common.Paths.EntryLocation);

            iconKey.SetValue(string.Empty, (updateExe ?? Common.Paths.EntryLocation) + ",1");

            key = key.CreateSubKey(@"shell\open\command");
            key.SetValue(string.Empty, GenerateCommandLine());
        }
Ejemplo n.º 2
0
 private static string GenerateCommandLine()
 => StartWithWindowsHandler.GenerateCommandLineExecution(Common.Paths.EntryLocation, "Sync.exe", "%1")
 .CombineParameters();