Hello Everyone,
execCommand() is not working in a JS activity in a workflow on application server.
There is on-premise instance and build is 9032.
Configuration is serverConfig.xml:
<!-- Command execution
blacklistFile : Path to the file containing the commands to blacklist
user : Execute commands as a different user -->
<exec blacklistFile="" user=""/>
JS Code:
logInfo(execCommand("cd",true));
Error:
BAS-010076 Cannot execute command 'cd' (err=2, the system cannot find the file specified.).
I am getting same error for every commands.
Please let me know if you have any question.
Thanks.
Parvesh.
Solved! Go to Solution.
If this is windows server try logInfo(execCommand("cmd /c cd",true));
If this is windows server try logInfo(execCommand("cmd /c cd",true));
Views
Replies
Total Likes
Hello Saikatk,
Thanks it is working now.
Could you please explain me why the first one was not working?
This solution is not mentioned in documentation.
How did you find it?
Thank.
Parvesh.
Views
Replies
Total Likes
1. No idea.
2. Adhiyan told me few months back.
Views
Replies
Total Likes
Hi,
'cd' is not a Windows executable, it's a cmd command.
Thanks,
-Jon
Views
Replies
Total Likes
Hello Jon,
Yes, 'cd' is a cmd command.
Can you please explain, what do you mean by Windows executable?
Thanks.
Parvesh.
Views
Replies
Total Likes