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
apathetichell
18 - Pollux

two things:

 

1) check your tempfilepath in variables under engine under workflow - does this look o.k.?

 

2) write your .bat file to engineworkflowdirectory instead of temp. run you workflow. open your command prompt. navigate to workflow director. run your .bat file in terminal. see the error message.

 

my hunch is maybe it's still looking for your old username? 

ChrisTX
15 - Aurora

I recently had a problem where I couldn't call a Powershell script when I created it in the Temp folder, using Desktop.

 

I think server runs workflows as a designated "run as" user, not the credentials of the submitting users. I may be wrong. But our groups that are already using server created a service account to use as the "run as" account.

apathetichell
18 - Pollux

fyi  - minor clarification - this is a .bat file - not a powershell script.  Powershell would be a .ps1 file.

Hsandness
7 - Meteor

@apathetichell 

1. Tempfilepath is correct, it's C:\Users\[Username]\AppData\Local\Temp

2. It won't let me write to the Engine WorkflowDirectory, it says "Access Denied". The directory is ...AppData\Local\bin

3. Yes, this is for a .bat file not powershell. I mistakenly used them interchangeably.  I'm gonna try edit the title of this topic once it's resolved.

 

@ChrisTX , I tried writing the .bat file to a non-temp folder but that didn't work with the Run Command tool but still worked within the CMD window.

apathetichell
18 - Pollux

All good - we all do - just a minor clarification.

 

2 - save the workflow to a new location in downloads - re try those steps. engine workflow shoudl show the new location.

 

You usually can't write to that location while Alteryx is running - and once you save a workflow it should put it in a normal editable directory.

Hsandness
7 - Meteor

I saved my workflow to my Downloads folder and ran the .bat file via the CMD terminal and got the following error message "This program is blocked by group policy. For more information, contact your system administrator."

 

Sounds like an IT issue.

apathetichell
18 - Pollux

Yup - can you mark my suggestion that it might be a lockdown on executing .bat files as the solution?

Labels