I have a C# program. Let's say I have a string like this:
string test = "dir";
Then I run the program via a cmd: (it's a command line .NET program btw)
C:\Users\testuser\source\repos\test\test\bin\Debug> testprogram.exe
I want the program to launch the "test" string, however it needs to be from the same CMD instance. For example, it would look something like this in a Batch file:
@echo off
dir
If I executed this batch script, it would do it on the same CMD instance.
I know you can do Process.Start();
, however that launches a completely new instance of CMD.