cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to spy CMD window from 'Start Process' Action

JeffreyMcCormic
Level 4
I am using the 'Start Process' action from the 'Utility-Environment' Business Object to launch a batch file. Once the batch file launches, I also need to send it multiple lines of data when the batch prompts for it. There is a prompt after each line has been completed. However, I am unable to spy this command prompt window in order to send it the text (in the form of saved variables) or even the Global Send Keys to submit the info. If I try to attach it, it cannot be found. What do I need to do in order to be able to spy this window or at least send it the info in the proper order? One thing to note that may be throwing a monkey wrench into things here is that BP is running in an HVD (VDI) environment. I thought maybe that's why it seemingly couldn't find the command prompt window no matter what I tried. Any thoughts? Thanks in advance for your time.
2 REPLIES 2

Denis__Dennehy
Level 15
Hello, I would probably look to auto-generate your batch file with all the required inputs set so that it runs end to end rather than requiring an interaction with it? So take all the batch text and recreate it at run time without the inputs and save it to a text file with .BAT extension. Then use the start process action to run the dynamically created .BAT file end to end without prompts. If you really need to interface with cmd prompt as a manual user would then start the %windir%\system32\cmd.exe process and have a look at the surface automation of terminal emulators guide in the learning area of the portal for pointers about how you might do it.

JeffreyMcCormic
Level 4
Dennis, I ended up looking at the problem that way, as you suggested, given the issues with spying the command prompt window. The end result of the batch window is a SQL entry, so I am also looking at simply having BP create the text file itself based on the info it has scraped from the request and submit it directly to the database. Would not have thought the cmd prompt spying would be such an issue 🙂