Problema al ejecutar un CMD en JAVA

estoy haciendo un pequeño programa y desde hace un rato estoy teniendo este error (antes no me pasaba y alguna ves no me pasa)

Esto es lo que ejecuta

String comando = "cmd.exe /c echo n | .\simulador.exe " +home+ "sht.txt "+away+"sht.txt";

Y este el error

Exception in thread "main" Cannot run program "cmd.exe": CreateProcess error=2

Adjunto tambien el error completo

Exception in thread "main" Cannot run program "cmd.exe": CreateProcess error=2, El sistema no puede encontrar el archivo especificado
    at java.lang.ProcessBuilder.start(
    at java.lang.Runtime.exec(
    at java.lang.Runtime.exec(
    at java.lang.Runtime.exec(
    at autoesms.AutoESMS.simularPartido(
    at autoesms.AutoESMS.rellenarJornadas(
    at autoesms.AutoESMS.main(
Caused by: CreateProcess error=2, El sistema no puede encontrar el archivo especificado
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(
    at java.lang.ProcessImpl.start(
    at java.lang.ProcessBuilder.start(

¿alguien entiende que pasa?

cmd.exe – CMD command – output to file – not working well

hope you could help me with this strange issue.
I have an EXE file that I run with this syntax:


<name of exe file> <name of specific test> <TRUEFALSE> <Iteration number>

** (details are not important here).

on each iteration, the file prints a line: “iteration #i”.
When I run the test, all the output is presented on the CMD window.

command: enter image description here

end of output:

enter image description here

As you may see, all 1000 iterations ran (0-999).
But, when I only add this to the command:

enter image description here

and try to get the exact same output in a file, it will always cut the X last iterations:

enter image description here

And the issue is consistent – if I want 100 iterations, it will get until ~64, for 10k iteration there will be 9996 prints, for 7000 it’s 6960, but never the amount I asked for.
It always misses the end for some reason. (But again, when the output is not to a file, but to the CMD window, all works great!)

Working on Windows 10.
thanks in advance for the helpers!

bash – How can I download a zip file (js-button) to the server I am connected to in the cmd?

I am trying to download the .zip folder from named ‘’.
I’ve tried to download it to the ubuntu server I am connected to via ssh with


which did not work since the downloaded file is only a HTML document.
When clicking the button the window that would open when downloading to the local storage it says ‘from:’, so I also tried


When hovering over the address in the pop-up window there appears another possible source which I tried


I also tried every version described above with wget.

when inspecting the page the download is presented with a button and there is an event listener below (javascript) so I could not find any helpful information there neither.

How can I download this .zip folder after all?

cmd.exe – Hide PsExec window when starting from cmd

I’m executing a command as another user on the same machine using PsExec from cmd like this:

PsExec.exe -u myuser -p mypass timeout 4

When I do so, a new cmd window opens and stays open until the command passed to PsExec has completed. How do I prevent this new window from opening or showing?

The closest I got was with the following, but this is still unsatisfactory, as the new window is visible for a few moments before minimizing:

PsExec.exe -u myuser -p mypass cmd.exe /c "start /min timeout 4"

The only other question I found regarding this was starting from PowerShell, but I’m in the standard cmd. I’m on Windows 10, PsExec v2.2.

windows – How can I prevent any cmd prompt from closing until I do so manually?

I have this cmd prompt about 4 times a day.
I think it accesses consent.exe since that program seems to be the last one used by it.
I used ExecutedProgramsList to get that info.
I think it might be doing something dodgy, no unusual traffic seen but still bugs me.

How can I prevent any cmd prompt from closing until I do so manually?

abri o CMD e apliquei o comando "react-native run-android" e deu esse problema. Alguém pode me ajudar? [fechada]

Invariant Violation: Module RCTEventEmitter is not a registered callable module (calling receiveTouches). A frequent cause of the error is that the application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.