public override Task <string> RunInstall(InstallerContext context)
        {
            var service = context.CreateRunningService();

            using var diag = new OpenFileDialog { AutoUpgradeEnabled = true };


            if (diag.ShowDialog(new Win32Proxy(_mainWindow)) != DialogResult.OK)
            {
                _logger.LogWarning($"{service.Name}: Update File not Selected");
                return(Task.FromResult("Es wurde Keine Datei fürs Update gewählt."));
            }

            var path = diag.FileName;

            try
            {
                var archive = new ZipArchive(new FileStream(path, FileMode.Open));

                context.MetaData[MetaKeys.UpdateFile]  = path;
                context.MetaData[MetaKeys.ArchiveFile] = archive;

                _zipArchive = archive;
            }
            catch
            {
                _logger.LogWarning($"{service.Name}: Error Open Update File");
                return(Task.FromResult("Die Datei konnte nicht geöffnet werden"));
            }

            return(Task.FromResult <string>(null));
        }
        public override async Task <string> RunInstall(InstallerContext context)
        {
            Content = "Service wird Gestoppt...";

            var service = context.CreateRunningService();

            if (service.ServiceStade == ServiceStade.Running)
            {
                if (!await _processManager.Stop(service, 10_000))
                {
                    _logger.LogWarning($"{service.Name}: Stopping failed");
                    return("Das Stoppen des Services ist Fehlgeschlagen");
                }
            }

            return(null);
        }