Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

execCommand() is not working in workflow.

Avatar

Avatar
Validate 1
Level 3
parveshp7822672
Level 3

Likes

14 likes

Total Posts

37 posts

Correct Reply

5 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 3
parveshp7822672
Level 3

Likes

14 likes

Total Posts

37 posts

Correct Reply

5 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
parveshp7822672
Level 3

04-11-2019

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.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Contributor
Level 3
saikatk2447661
Level 3

Likes

22 likes

Total Posts

57 posts

Correct Reply

14 solutions
Top badges earned
Contributor
Shape 1
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Contributor
Level 3
saikatk2447661
Level 3

Likes

22 likes

Total Posts

57 posts

Correct Reply

14 solutions
Top badges earned
Contributor
Shape 1
Give Back 5
Give Back 3
Give Back
View profile
saikatk2447661
Level 3

04-11-2019

If this is windows server try logInfo(execCommand("cmd /c cd",true));

Answers (4)

Answers (4)

Avatar

Avatar
Validate 1
Level 3
parveshp7822672
Level 3

Likes

14 likes

Total Posts

37 posts

Correct Reply

5 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 3
parveshp7822672
Level 3

Likes

14 likes

Total Posts

37 posts

Correct Reply

5 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
parveshp7822672
Level 3

04-11-2019

Hello Jon,

Yes, 'cd' is a cmd command.

Can you please explain, what do you mean by Windows executable?

Thanks.

Parvesh.

Avatar

Avatar
Establish
MVP
wodnicki
MVP

Likes

960 likes

Total Posts

1,090 posts

Correct Reply

509 solutions
Top badges earned
Establish
Affirm 500
Contributor
Shape 1
Give Back 100
View profile

Avatar
Establish
MVP
wodnicki
MVP

Likes

960 likes

Total Posts

1,090 posts

Correct Reply

509 solutions
Top badges earned
Establish
Affirm 500
Contributor
Shape 1
Give Back 100
View profile
wodnicki
MVP

04-11-2019

Hi,

'cd' is not a Windows executable, it's a cmd command.

Thanks,

-Jon

Avatar

Avatar
Contributor
Level 3
saikatk2447661
Level 3

Likes

22 likes

Total Posts

57 posts

Correct Reply

14 solutions
Top badges earned
Contributor
Shape 1
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Contributor
Level 3
saikatk2447661
Level 3

Likes

22 likes

Total Posts

57 posts

Correct Reply

14 solutions
Top badges earned
Contributor
Shape 1
Give Back 5
Give Back 3
Give Back
View profile
saikatk2447661
Level 3

04-11-2019

1. No idea.

2. Adhiyan​​ told me few months back.

Avatar

Avatar
Validate 1
Level 3
parveshp7822672
Level 3

Likes

14 likes

Total Posts

37 posts

Correct Reply

5 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 3
parveshp7822672
Level 3

Likes

14 likes

Total Posts

37 posts

Correct Reply

5 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
parveshp7822672
Level 3

04-11-2019

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.