Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Run Command Tool Powershell - Error Code: 1

Hsandness
7 - Meteor

Hello,

 

I'm trying to run .bat files in Alteryx Designer and am running into errors. I'm able to run the .bat command in a powershell window outside of Alteryx so I know the command is accurate and without typos. I checked where Alteryx was downloaded on my machine and it's where it's supposed to be which is here C:\Users\[User]\AppData\Local\Alteryx.

 

There's plenty of articles on the community about Powershell issues but I still haven't come across a solution that worked for me. I attached my workflow if anyone is able to replicate my issues. You'll just have to put your file path where it says "[Your File Path Here]" in the formula tool.

 

System Setup:

Version: 2022.1.1.42725

Type: Non-Admin

AMP Engine: Off

Operating System: Windows

 

 

16 REPLIES 16
Hsandness
7 - Meteor

The Run Command tool works on the gallery but not in Designer.

Gaurav_Dhama_
8 - Asteroid

I just ran the flow, and it worked without errors. Can you put up a screenshot of the error you are getting?

Hsandness
7 - Meteor

@Gaurav_Dhama_ 

 

Attached is the error code I'm receiving. I asked others at my company to run this workflow and they received the same error as me. They were running version 2021.4 but I don't think the version of Alteryx is the issue. 

 

For the workflows on Gallery that can use the Run Command tool the temp folder is being created here "D:\ProgramData\Alteryx\Service\Staging\". When I run it in Designer the temp folder is "C:\Users\[User]\AppData\Local\Temp\". The AlteryxEngineCMD.exe file is present in the binaries folder under ...\Local\Alteryx\bin so I threw that out as a possibility for the error.

 

I also don't think it's an IT issue otherwise I wouldn't be able to run the command in CMD window outside of Alteryx.

Gaurav_Dhama_
8 - Asteroid

This error means that CMD was not able to locate the file or directory. I checked the workflow and i noticed that the path needs to be updated in two places.

 

Inside formula (2) tool, did you update your location path in both the following columns?

1. Make Directory

2. Directory w/o Quotations

 

I tested by not updating one and got the error you posted. So my guess is that the location was not correct in one of the two columns mentioned above.

Hsandness
7 - Meteor

Both file paths are updated on my end and I still see the same error but if I run the full path that's in Make Directory in CDM window outside of Alteryx it works. What's odd is when I run this in Alteryx, the "CreateInputFolderCommand1.txt" does not get written to a temp folder but when this is run outside of Alteryx, it does.

apathetichell
18 - Pollux

Are you sure your worker bot  has the ability to make directories on your server? security issues can create these kinds of problems. I have also seen situations where security didn't allow the server to execute .bat files.

Hsandness
7 - Meteor

@apathetichell , Scheduled workflows on the gallery are able to make new directories so I want to say it's not a security issue. But, I'm not sure if the worker bot is different on gallery than it is in designer. 

 

I don't believe it is, I've read before that Alteryx designer runs workflows using the credentials of the currently logged in user. If that's the case, it makes no sense that I could run .bat files in a CMD window but not in Alteryx.

 

 

I'm gonna go talk to my IT department about the securities just in case though. If they provide any useful information I'll follow up on this post.

apathetichell
18 - Pollux

you can on server - but not locally on designer? Do you have an admin installl of designer or non-admin?

Hsandness
7 - Meteor

Correct, server is able to create new directories because it's run under a different user account that all our scheduled workflows run under.  I have a non-admin install that was working fine up until recently. I should point out that I did have to get a new laptop at the beginning of May and that's when these errors started. I don't see how a new laptop would cause issues with the Run Command tool though.

 

My IT department wasn't any help, they don't deal with Alteryx and weren't able to confirm if it's a security issue. We have a designated Alteryx colleague here that I'll work with once they're back next week and see if it's a non-admin vs. admin issue. 

Labels