Page 1 of 1

Runtime module fail with SPACES even in quotes

Posted: Fri Nov 11, 2022 5:02 pm
by DK.Ideagen
Example
start "C:\Program Files\RoboTask\RoboTaskRuntime.exe" "C:\Users\daniel.kendall\Notepad.tsk"
works

Example
start "C:\Program Files\RoboTask\RoboTaskRuntime.exe" "C:\Users\daniel.kendall\OneDrive - Ideagen plc\Desktop\Notepad.tsk"
doesn't work and gets cut off at the first space.

This is despite wrapping it in quotes which normally solves this re:cli

Re: Runtime module fail with SPACES even in quotes

Posted: Fri Nov 11, 2022 9:31 pm
by Oleg
Do you use the command START in CMD/batch file?

Re: Runtime module fail with SPACES even in quotes

Posted: Mon Nov 14, 2022 9:24 am
by DK.Ideagen
That is how I would start a program from the CLI it wouldn't work otherwise (Illegal expression)

The bat files from robotask don't do that though and use a different executable e.g.
"C:\Program Files\RoboTask\RTaskRun.exe" $6CD53B88

Re: Runtime module fail with SPACES even in quotes

Posted: Mon Nov 14, 2022 11:10 am
by Oleg
The command line

Code: Select all

"C:\Program Files\RoboTask\RoboTaskRuntime.exe" "C:\Users\daniel.kendall\OneDrive - Ideagen plc\Desktop\Notepad.tsk"
should work

If you want to use command START you must use something like this:

Code: Select all

start "Single task" "C:\Program Files\RoboTask\RoboTaskRuntime.exe" "C:\Users\daniel.kendall\OneDrive - Ideagen plc\Desktop\Notepad.tsk"
1-st parameter in quotes after START command is the title.
StartCommand.png
StartCommand.png (19.24 KiB) Viewed 5211 times
If you use the program name in quotes (and parameters too) the title parameter is required

Re: Runtime module fail with SPACES even in quotes

Posted: Mon Nov 14, 2022 11:16 am
by DK.Ideagen
In powershell specifically the behavior is different.

Start-Process: A positional parameter cannot be found that accepts argument 'C:\Users\daniel.kendall\OneDrive - Ideagen plc\Desktop\Notepad.tsk'.

Re: Runtime module fail with SPACES even in quotes

Posted: Mon Nov 14, 2022 12:26 pm
by Oleg
If you use PowerShell you have to use such command line

Code: Select all

start-process "C:\Program Files\RoboTask\RoboTaskRuntime.exe" "`"C:\Users\daniel.kendall\OneDrive - Ideagen plc\Desktop\Notepad.tsk`""
Pay attention to the symbol `

or such command line

Code: Select all

start-process -filepath "C:\Program Files\RoboTask\RoboTaskRuntime.exe" -ArgumentList "`"C:\Users\daniel.kendall\OneDrive - Ideagen plc\Desktop\Notepad.tsk`""
Read here about Start-Process cmdlet

I tested this on my computer
When I use such command line

Code: Select all

start-process "C:\Program Files\RoboTask\RoboTaskRuntime.exe" "C:\Users\olegyershov\OneDrive\Test task.tsk" 
I get the error:

Code: Select all

E: 14.11.2022 13:21:38: Task "C:\Users\olegyershov\OneDrive\Test" does not exist
If I use this

Code: Select all

start-process "C:\Program Files\RoboTask\RoboTaskRuntime.exe" "`"C:\Users\olegyershov\OneDrive\Test task.tsk`"" 
the task works without problem