How to achieve Passing Arguments to Robot from Command Prompt

How to achieve Passing Arguments to Robot from Command Prompt?

Step by step guide

Requirement where in one would like to pass arguments to the Robot. In that case the one of option is to invoke the workflow from command prompt and pass the argument. 
Below is the command line example of how the same can be achieved:

  • File :- We need to provide the path where the Main.xaml is located for the project which we want to run.
  • Input :- We need to pass the argument which would be consumed inside the workflow.


UiRobot.exe -file "%HOMEPATH%\Documents\UiPath\command_line_test\Main.xaml" -input "{'InArgument1': 'Print this string.'}" 
Snipped of the test, showcasing 2 arguments that is used. 

 

Command Prompt :- commands to call Main.xaml with Arguments.