Search code examples
blueprism

Running Batch scripts in Blue Prism


My requirement is to run a file with extension '.bat'. However, the Blue Prism Application Modeler only accepts programs with the extension '.exe'.

My first thought was if I could spy Windows Explorer like an application, and navigate and spy File Explorer interface elements in order to navigate to and run that file by clicking it.


Solution

  • Don't spy Windows Explorer windows! This is directly contradictory to best practices. (If you need to traverse file/folder structures in the filesystem, use the Utility - File Management VBO bundled with Blue Prism.)

    Run the batch file instead using the Start Process action within the bundled Utility - Environment VBO. In later versions of Blue Prism, the VBO also includes the similar Start Process and Read Stderr and Stdout which not only starts the process but also captures the terminal outputs:

    Utility - Environment :: Start Process and Read Stderr and Stdout configuration