-1

I want to open a cmd software with batch file and write command in cmd mode in same batch file.

I write command for open software but after open software command doesn't working. I want to run batch run with robotask. in robo task i can type command after open cmd but i want create in same batch file.

  • Take a look at the `ERRORLEVEL` value. https://stackoverflow.com/questions/42967840/errorlevel-vs-errorlevel-vs-exclamation-mark-errorlevel-exclamation-mark – DDS Aug 30 '23 at 08:04
  • show your script, so we can see where you need help. – Stephan Aug 30 '23 at 08:08
  • The *Windows Command Processsor* `cmd.exe` is processing a batch file. Whenever an executable must be started after parsing a command line in the batch file, `cmd.exe` starts the executable and waits for the self-termination of the started executable. `cmd.exe` cannot be instructed to read more lines from the batch file and send those lines to the started executable via the standard input stream. `cmd.exe` is not designed to communicate with any other running process. – Mofi Aug 31 '23 at 05:09
  • If [RoboTask - Robotic Desktop Automation Software for Windows](https://robotask.com/) does not offer itself command line options to control what it should do once being started or supports reading commands to execute from a file specified with an option on the command line starting it, your approach to control this process using a batch file cannot work ever. There is the [RoboTask User's Guide](https://robotask.com/help/) with the appendix [Command Line Parameters](https://robotask.com/help/commandline_parameters.htm). – Mofi Aug 31 '23 at 05:09
  • It looks like there is `RoboTaskRuntime.exe` supporting running it with the full file name of a task file which contains the *RoboTask* commands to execute by *RoboTask*. It looks like your question for an [XY problem](https://xyproblem.info/) is caused mainly by not reading the help/user's guide of the used application. There is most likely not even a batch file processed by `cmd.exe` necessary to automate a task. There can be a shortcut file used which on double click runs `RoboTaskRuntime.exe` with the fully qualified file name of the task file configured for shortcut property __Target__. – Mofi Aug 31 '23 at 05:09

0 Answers0