Issue getting Shell commands to run
-
Hey there! I’m having a real tough time getting my event script to run. The script works when run manually, but doesn’t seem to want to run properly when I run the bot. I think I can see the command line open momentarily but then it closes, and doesn’t run the script.
I’ve tried the troubleshooting step of adding a logging file but it doesn’t get written to, so I don’t think the script is running at all. I’m trying to run something in Node, but have also tried a super simple plain .js script that didn’t work either.
Attaching my command and log file. Anything obvious I’m doing wrong?
-
Hi! It may be that not all the necessary installation files ended up in the C:\ProgramData\Dataclay folder. Do you have the D_shell.exe file installed there? We are finding that because it’s not signed newer versions of Windows won’t install it. Can you share the contents of that directory with us?
-
Hey thanks for your response! Here is a screenshot of the directory. I do see the D_shell app in there. Let me know if you need any other information that could be helpful.
-
@yansfeld That looks good — all the necessary files are present from installation. Can you try using the absolute path to the javascript file you are running? In the initial screenshot you show
node "Desktop\TemplaterScript\postanimations.js" $out_name
, but can you trynode "C:\Users\myuser\Desktop\TemplaterScript\postanimations.js
instead?We have seen cases where the %PATH% environment variable is different when running a shell script as opposed to running through a normal command terminal. You may want to also use the absolute path to the
node.exe
interpreter, too. For example, in the screenshot you have simpleynode ...
but you may want to tryC:\ProgramFiles\node\bin\node.exe ...
I’m not sure where you have node installed, but please try that and see if it helps. -
@ariestav Awesome thanks for the ideas. I will try those out and get back to you!
-
Hello! I think the absolute paths seem to have fixed the issue. Of course, that doesn’t mean that my Javascript code is any good, but at least it seems to be running the script. Thanks for your help!
-
Great to hear! Happy Rendering!