cancel
Showing results for 
Search instead for 
Did you mean: 

Using CMD Prompt to run script and continue to get Automation server can't create object

MarcusAllen
Level 4

Hello All,

I am currently working on a bot that will be using the command line to complete the task. The script uses cscript and command prompt and works fine and whenever I run commandline without blueprism starting the process/application it will work as intended. But when I'm testing the bot and run the script it continues to say Automation Server can't create object. Which I've done some research and found out that may has something to do with ActiveX and it's DLL.

I am just wondering has anyone dealt with this before or seen something similar and if so I would appreciate any tips or nudges in the correct direction.

Thank you.

10 REPLIES 10

ewilson
Staff
Staff
Hi @MarcusAllen,

So if you run this yourself everything works fine, but when you run it via a Digital Worker you get an error? That seems like it might be a permissions issue. How are you working with the command line and cscript in BP? Have you written your own VBO and code stage or are you using something from the DX?

Cheers,

MarcusAllen
Level 4
@ewilson thank you for your response. So it is a custom jscript. I'm running the script in my BluePrism Server Environment.

It runs fine if running the script through cmd without the bot actually starting the cmd process. Now funny enough. If I open the command prompt manually then attach to the command prompt it works as intended. I'm doing all of this under my blueprism service account.

The task is simply copy and paste the string the bot builds which follows something like this cscript script.js "Argument 1" "Argument 2" "Argument 3" "Argument 4".

I hope that I gave enough detail with that answer Eric and if you need any more info please let me know. Again thank you for your assistance on this.​

ewilson
Staff
Staff
Ok, and how are you launching the cmd process from within your Blue Prism process? Are you using the Utility - Environment VBO, your own code stage, or something else?

Cheers,
Eric

MarcusAllen
Level 4
Before doing it manually. I was using Utility - Environment:Start Process and having the full path to the WOW64/CMD.EXE to open the command prompt.

ewilson
Staff
Staff
One more question. Hopefully my last. 🙂 What ActiveX component are you trying to invoke in your JScript? Is it something standard like (Excel.Application) or something internal to your company?

Cheers,

MarcusAllen
Level 4
@ewilson it is a software that is used in our company called Caseware. It opens using new ActiveXObject("CaseWare.Application"); And two other calls just as following.

ewilson
Staff
Staff
Ok, so lets trying something a little different. Instead of opening a command prompt from the DW and trying to run csript from it change your Start Process call in the Utility - Environment VBO to just reference "c:\Windows\SysWOW64\cscript.exe" as the process name. Then pass in your parameters under the Arguments input. So it would look something like this:

36204.png

NOTE: I'm using Start Process Read Stderr and Stdout so I can see what the result is.

Cheers,

MarcusAllen
Level 4
@ewilson Thank you for the image. Seems like I need to update the object because I do not have that option. That could be an issue right there. Let me see about getting an update and then try to run that bot.​

ewilson
Staff
Staff
Ah, that could be an issue, but I’m not certain. This is the latest version of the VBO that’s available from the Digital Exchange.

Cheers,