How can I execute a KNIME workflow from Windows CMD when KNIME is not actually installed because I always start it with Windows CMD?

Because of certain restrictions, I have to run KNIME 4.6.3 from the Windows console.

I would like to be able to run specific workflows by running them with console commands. However, running a console command results in an error because KNIME is not installed. For example, this does not work because knime cannot be found:

knime -nosplash -application org.knime.product.KNIME_BATCH_APPLICATION -workflowDir="C:\Users\username\knime-workspace\Workflow"

What can I do in order to solve this problem? Is there a way to write something else instead of knime in the beginning that calls the KNIME program and executes the command properly?

@MgntMoe

You either need to add the KNIME executable to your Windows path (I suspect from your post that your computer is locked down by IT and you cannot do that) or use the full path to the Windows executable. Note the ampersand & at the start of the command and the quotes around the path; this is because the path has a space in it, therefore, the path needs enclosing in quotes, which then requires ampersand at the start of the command. Your path may be different, though the path shown is the default on a 64-bit windows.

& "C:\Program Files\KNIME\knime.exe" -nosplash -application org.knime.product.KNIME_BATCH_APPLICATION -workflowDir="C:\Users\username\knime-workspace\Workflow"
2 Likes

@DiaAzul When I try to use your approach with the ampersand &, I get notified that the symbol & cannot be syntactically processed.

If I move my whole KNIME package to a folder where there are no spaces, e.g. C:\Users\username\Downloads\knime_4.6.3\knime.exe, I get notified that the execution of the application is prohibited by company policy.

(If it is somehow possible to get a KNIME workflow to run via command-line, I would like to execute this workflow. Please note that there is a Credentials Configuration node that has to be provided with a password. Is there an option to provide it either via a command-line option and/or is there a way to use an option that opens a GUI window where the password can be entered manually?)

Any particular reason you need to run it from the command line? Is it somehow scheduled so you do not want to open knime and trigger it?
br

I would like to test running KNIME from Windows CMD because I would like to test what is possible and what cannot be done. If my tests are successful, I would consider to set up a KNIME server in my current environment. When things are, however, blocked and I cannot circumvent this somehow, I cannot proceed.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.