I know that I can launch programs from the Command Prompt, but is there any way to enter commands after opening that program?
For example, if I open DOSBox from cmd, how would I enter a command in DOSBox from cmd?
I have tried, but I got no solution.
I think you can’t specify commands as parameters to
DOSBox.exe, but you can specify another executable file that you wish to launch from DOSBox as a command-line parameter to
"C:Program Files (x86)DOSBox-0.74DOSBox.exe" "C:Other.exe"
or the above as parameter to cmd.exe:
cmd /c ""C:Program Files (x86)DOSBox-0.74DOSBox.exe" "C:Other.exe""
You can only do this by making a third party App, let’s call it TheApp, you would type TheApp.exe then the batch command name after it and the program will then store that and repeat it again when you hit enter. It is handling what command you type instead of cmd.exe handling it.
It’s sort of like a shell within a shell.
TheApp copy "c:windowssystem32something.ini" "E:backup_0012.5.16"
When you hit enter it will continue to store the copy command but not the paramaters) as part of TheApp, unless you type TheApp SomeDifferentCommand.
I am not aware of any existing programs that can do this, but you know C so you’re set to go by the look of it, it would take a little more work to have it work with both internal commands and external commands (which are really just programs in themselves, mainly .com or .exe files)