public void Run() { try { var dictionary = Parser.Parse(Uri); Parser.PreExecute(OsServices); var args = Parser.ReplaceTokens(ApplicationConfig.Args); Serilog.Log.Debug($"Starting external application: '{ApplicationConfig.Exec}' with args: '{string.Join(',', args)}'"); if (!File.Exists(ApplicationConfig.Exec)) { Serilog.Log.Error($"Selected application does not exist:{ApplicationConfig.Exec}"); OsServices.OpenText($"Selected application does not exist:{ApplicationConfig.Exec}"); return; } var process = OsServices.Execute(ApplicationConfig.Exec, args); Serilog.Log.Debug("Post execute starting."); Parser.PostExecute(process); Serilog.Log.Debug("Post execute complete."); } catch (Exception e) { OsServices.OpenText($"Launch failed: {e.Message}"); } }
public void Run() { var variables = Parser.Parse(Uri); var args = ReplaceArgs(ApplicationConfig.Args, variables); Serilog.Log.Debug($"Starting external application: '{ApplicationConfig.Exec}' with args: '{string.Join(' ', args)}'"); var process = OsServices.Execute(ApplicationConfig.Exec, args); Serilog.Log.Debug("Post execute starting."); Parser.PostExecute(process); Serilog.Log.Debug("Post execute complete."); }
public void Run() { var variables = Parser.Parse(Uri); var args = ReplaceArgs(ProtocolConfig.Args, variables); Serilog.Log.Debug($"Starting external application: '{ProtocolConfig.Exec}' with args: '{args}'"); var process = OsServices.Execute(ProtocolConfig.Exec, args); if (Parser.WaitForProcessStartup) { process.WaitForInputIdle(); } }