Is there a parameter for MSDOS commands (e.g. ipconfig) that make them wait for input to disappear?

When I run, for example. ipconfig using the Run command (Windows key + R), as soon as the program executed it, it immediately closes the command line interface instance, is there any universal parameter that I can add:

  • ipconfig
  • nslookup
  • dir
  • etc...

to ensure that the results will be printed in the console window?

+4
source share
3 answers

Use cmd with the /k switch:

 cmd /k ipconfig 
+13
source

There is also the possibility of concatenating commands

& is used to place only a few commands on a line & & will be broken if the last command was not successful

 cmd /k ipconfig & pause & exit 
+9
source

Or you simply execute "cmd" with the "Run" command, which will open a DOS prompt.
If you type "ipconfig", the command line will remain open.

(ok, I admit: basically this is the same as "cmd / k ipconfig")

+3
source

Source: https://habr.com/ru/post/1286005/


All Articles