I have run into a problem when trying to use the exec node to take a screen shot of a webpage using Chrome. I did have this working but now it fails. I am using this on a windows 10 machine & Node-red 2.0.5.
If I input the following to the CMD window it works... (I am using google site for testing purposes)
What if you put the entire command (minus the double quotes arount the path to the command) along with all the options in an inject nodes msg.payload then leave the exec node command and option blank but check off the "+ Append' so it will use the complete string from msg.payload.
Isn't it more likely to do with the environment the command is running in? A background task rather than a terminal with a window? If it were Linux I would say to try it using ssh and see if it works there.
Thankyou all for your replies. I have tried various methods on how the exec command is populated but all result in the same failure.
It is strange because...
1 - This used to work. I had it working a few months back but had not looked closely for a while and when i did look i noticed it had stopped working. In my application i pass the cmd through to the exec via the payload. (what have i changed, nothing other than the node-red rev)
2 - If i copy and past the same command directly into the windows command window. It works , a screenshot is taken and a .png is created and stored in the temp directory. But if i copy and paste into the exec node it fails as shown. Possibly pointing the finger at the exec node or node-red??
here is the command taking screenshot of node-red editor.