Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# process start

/*
The quick approach where you have limited control over the process, is to use the
static Start method on the System.Diagnostics.Process class...
*/

using System.Diagnostics;
...
Process.Start("process.exe");

/*---------------------------------------------------------
The alternative is to use an instance of the Process class. This allows much more
control over the process including scheduling, the type of the window it will run in and,
most usefully for me, the ability to wait for the process to finish.
*/

using System.Diagnostics;
...
Process process = new Process();
// Configure the process using the StartInfo properties.
process.StartInfo.FileName = "process.exe";
process.StartInfo.Arguments = "-n";
process.StartInfo.WindowStyle = ProcessWindowStyle.Maximized;
process.Start();
process.WaitForExit();// Waits here for the process to exit.
This method allows far more control than I've mentioned.
Comment

PREVIOUS NEXT
Code Example
Csharp :: remove first object from list c# 
Csharp :: new parameterized thread c# 
Csharp :: unity deadzone 
Csharp :: c# add guid to array 
Csharp :: trnasform ubnity 
Csharp :: set decimal point c# 
Csharp :: asp textarea 
Csharp :: if string contains number c# 
Csharp :: ensuresuccessstatuscode exception 
Csharp :: c# const string array 
Csharp :: unity set active for seconds 
Csharp :: unity get selected gameobject 
Csharp :: c# initialize array 
Csharp :: how is c# pronounced 
Csharp :: get length of enum values 
Csharp :: unity lock cursor to center 
Csharp :: set particle system start colour + random between two 
Csharp :: create models from database ef core 
Csharp :: how to make an object jump in unity 
Csharp :: c# mongodb connection 
Csharp :: c# encrypt decrypt string 
Csharp :: c# font bold set 
Csharp :: reverse for loop 
Csharp :: instantiate iqueryable c# 
Csharp :: varibles c# 
Csharp :: convert text to number c# 
Csharp :: c# combine list of bool 
Csharp :: c# datetime remove time 
Csharp :: how to get the width of the screen C# 
Csharp :: how to use distinct in linq query in c# 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =