Run CMD Command in Workflow

Hello,

I’m developing a workflow with the hopes of calling a CMD script during execution. In doing some research, I’ve seen plenty of articles\forums trying to achieve the opposite (running a workflow from Command Line).

To provide some context, my workflow connects to an AWS Athena database. However, in order to connect, the end user must complete a MFA. Buried in a long pathway is an executable file that completes the MFA processing. Instead of the user having to navigate the folder structure and then run the KNIME workflow, I want the executable to be called upon during the workflow execution. I have the command line script that calls the executable, I just need to figure out a way to open the CMD prompt and enter it automatically.

Example CMD Script:

C:\Users\jgebhard> start (pathway to executable)

I’ve briefly experimented with the External Tool (Labs) node but it appears it’s function requires input data. I just need to open the Command Prompt window and run my script. Perhaps there’s a way to do this in Java but my background is predominantly in SQL and I haven’t been able to find the right recourse to help me code it.

Thanks in advance for any help or suggestions