/// <summary> /// Execute a command on the Tcc API. If the command line arguments include /?, it will be deferred /// to the generic command line executor, as this seems to be pre-processed by TCC natively. /// </summary> /// <param name="name"></param> /// <param name="commandText"></param> /// <returns></returns> public uint ExecuteCmd(TccCommand command, CommandLineArgs commandLineArgs) { try { if (commandLineArgs.Any(item => item.IsFlag && item.Option == "?")) { return(Command(command.Name + " " + commandLineArgs.ToString())); } return(CmdExecutor.Execute(command.WinApiCmd, commandLineArgs.ToString())); } catch (Exception e) { Console.WriteLine(e.Message); return(1); } }