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
Runtime module fail with SPACES even in quotes
-
- Posts: 22
- Joined: Wed Mar 09, 2022 10:33 pm
Re: Runtime module fail with SPACES even in quotes
Do you use the command START in CMD/batch file?
Oleg Yershov
-
- Posts: 22
- Joined: Wed Mar 09, 2022 10:33 pm
Re: Runtime module fail with SPACES even in quotes
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
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
The command line
should work
If you want to use command START you must use something like this:
1-st parameter in quotes after START command is the title.
If you use the program name in quotes (and parameters too) the title parameter is required
Code: Select all
"C:\Program Files\RoboTask\RoboTaskRuntime.exe" "C:\Users\daniel.kendall\OneDrive - Ideagen plc\Desktop\Notepad.tsk"
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"
Oleg Yershov
-
- Posts: 22
- Joined: Wed Mar 09, 2022 10:33 pm
Re: Runtime module fail with SPACES even in quotes
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'.
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
If you use PowerShell you have to use such command line
Pay attention to the symbol `
or such command line
Read here about Start-Process cmdlet
I tested this on my computer
When I use such command line
I get the error:
If I use this
the task works without problem
Code: Select all
start-process "C:\Program Files\RoboTask\RoboTaskRuntime.exe" "`"C:\Users\daniel.kendall\OneDrive - Ideagen plc\Desktop\Notepad.tsk`""
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`""
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"
Code: Select all
E: 14.11.2022 13:21:38: Task "C:\Users\olegyershov\OneDrive\Test" does not exist
Code: Select all
start-process "C:\Program Files\RoboTask\RoboTaskRuntime.exe" "`"C:\Users\olegyershov\OneDrive\Test task.tsk`""
Oleg Yershov