Reputation: 261
Here's something that I want to achieve:
Is it possible?
Upvotes: 1
Views: 402
Reputation: 175085
As mentioned in comments, you can use Process.Start(pathToExe)
to launch a new process.
You can start your program in a new cmd with cmd /C start "Title" "C:\path\to\app.exe"
:
string cmdPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "cmd.exe");
string exePath = System.Reflection.Assembly.GetEntryAssembly().Location;
ProcessStartInfo newCmd = new ProcessStartInfo(cmdPath);
newCmd.Arguments = String.Format(@"/C start ""{0}"" ""{1}""", "WindowTitle", exePath);
Process.Start(newCmd);
You probably want some sort of conditional around that in order to not fork bomb yourself
Upvotes: 1