I need to run below TXL command using C#. basically i just run a command and store the output in temp.grm. If I run this command in cmd it works fine which means there is no error with the command.
The problem is when I try to run this command using C# program where it just creates a blank temp.grm. Can anyone please help me with this. Thanks!
command: txl -q C:\Users\karth\Desktop\TXL\java.grm C:\Users\karth\Desktop\TXL\Tools\RemoveTxlComments\grm.txl -s 1000 > C:\Users\karth\Desktop\TXL\Temp\temp.grm
...
/* command = command "txl -q C:\\Users\\karth\\Desktop\\TXL\\java.grm C:\\Users\\karth\\Desktop\\TXL\\Tools\\RemoveTxlComments\\grm.txl -s 1000 > C:\\Users\\karth\\Desktop\\TXL\\Temp\\temp.grm" string*/
public bool ExecuteCommand(string command)
{
try
{
_cmdPrompt.UseShellExecute = true;
_cmdPrompt.WorkingDirectory = _system32;
_cmdPrompt.FileName = _cmdPromptPath;
_cmdPrompt.Verb = "runas";
_cmdPrompt.Arguments = "/c " + command;
_cmdPrompt.WindowStyle = ProcessWindowStyle.Hidden;
Process.Start(_cmdPrompt);
return true;
}
catch (Exception e)
{
_logger.LogMessage(e.Message + _newLine);
return false;
}
}