Type into CMD

Hi guys, I’m trying to type a command into CMD, but I’m getting the following error:

Can you guys help me with this?

Regards.

Hi @UiP_Mc

  1. Use Send Hot Key to => Open run window and Indicate Desktop

  2. Use Type Into to => Write “cmd[k(enter)]” Command in run window and Indicate

  3. Use Type Into to => Write “ipconfig[k(enter)]” Command and Indicate Command Prompt

here is the workflow, hope got resolved
Cheers buddy kindly let know whether this works or not
WriteCommandInCMD.zip (11.4 KB)

1 Like

If you want to run CMD scripts, try instead run Powershell. You won’t need to type or open CMD at all.

1 Like

Hi @RasinduLakkitha95,

It won’t type in the CMD properly. Can you take a look at my workflow?
Basically it:

  1. Win + R (Run)
  2. Type cmd then enter
  3. change directory
  4. -certutil x.csv x.txt (basically this converts the CSV file to base64 inside a .txt file)
  5. close cmd

ConvertCSVtoBase64.zip (1.8 KB)

Thanks!

try to change close application selector to
<wnd app='cmd.exe' cls='ConsoleWindowClass' title='*cmd.exe' />

Hi @rmunro, I tried to use an Open Application for CMD but the problem here is that it won’t actually type properly in CMD.

Your " WriteCommandInCMD.zip" workflow ran fine on my pc without error. I will check the other one and get back.

The WriteCommandInCMD.zip was from @RasinduLakkitha95, mine is the ConvertCSVtoBase64.zip, can you please check that one? I’m having errors in that one.

Hi @UiP_Mc
buddy, Your workflow works fine but the only error occurred in final activity.

Becuase in final activity - Close application , You are not edited the selector

now, try the workflow
here is the workflow, hope got resolved
Cheers buddy kindly let know whether this works or not
EditedConvertCSVtoBase64.zip (12.2 KB)

Thanks Rasindu, I’ll get back to this right after I arrive at the office.

Regards.

Hey @RasinduLakkitha95, it’s still not working, once it runs, it:

  1. Opens run by pressing Win + R
  2. Types cmd + enter
  3. after that it pops the cmd but nothing is being typed on. Here’s what it looks like:

    But it says in the logs it executed successfully. How so?
    image

I tried to run it again, it worked. How is that possible? In the first run it didn’t on the second run it did. But the first time I opened CMD it didn’t even type a single character, but somehow it got things to work on the second run.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.