C# Class Zazzles.ProcessHandler

Afficher le fichier Open project: FOGProject/zazzles Class Usage Examples

Méthodes publiques

Méthode Description
CreateImpersonatedClientEXE ( string filePath, string param, string user ) : Process

Create an process as another user. The process will not be run automatically. This can only be done on unix systems.

Kill ( string name ) : void

Kill the first instance of a process

KillAll ( string name ) : void

Kill all instances of a process

KillAllEXE ( string name ) : void

Kill all instances of an EXE

KillEXE ( string name ) : void

Kill the first instance of an EXE

Run ( string filePath, string param, bool wait = true, bool log = true ) : int

Run a process

Run ( string filePath, string param, bool wait, string &stdout, bool log = true ) : int

Run a process

RunClientEXE ( string file, string param, bool wait = true, bool log = true ) : int

Run an EXE located in the client's directory

RunClientEXE ( string file, string param, bool wait, string &stdout, bool log = true ) : int

Run an EXE located in the client's directory

RunEXE ( string filePath, string param, bool wait = true, bool log = true ) : int

Run an EXE

RunEXE ( string filePath, string param, bool wait, string &stdout, bool log = true ) : int

Run an EXE

Private Methods

Méthode Description
SplitOutput ( string output ) : string[]

Method Details

CreateImpersonatedClientEXE() public static méthode

Create an process as another user. The process will not be run automatically. This can only be done on unix systems.
public static CreateImpersonatedClientEXE ( string filePath, string param, string user ) : Process
filePath string The path of the executable to run
param string Parameters to run the process with
user string The user to impersonate
Résultat System.Diagnostics.Process

Kill() public static méthode

Kill the first instance of a process
public static Kill ( string name ) : void
name string The name of the process
Résultat void

KillAll() public static méthode

Kill all instances of a process
public static KillAll ( string name ) : void
name string The name of the process
Résultat void

KillAllEXE() public static méthode

Kill all instances of an EXE
public static KillAllEXE ( string name ) : void
name string The name of the process
Résultat void

KillEXE() public static méthode

Kill the first instance of an EXE
public static KillEXE ( string name ) : void
name string The name of the EXE
Résultat void

Run() public static méthode

Run a process
public static Run ( string filePath, string param, bool wait = true, bool log = true ) : int
filePath string The path of the executable to run
param string Parameters to run the process with
wait bool Wait for the process to exit
log bool Log errors
Résultat int

Run() public static méthode

Run a process
public static Run ( string filePath, string param, bool wait, string &stdout, bool log = true ) : int
filePath string The path of the executable to run
param string Parameters to run the process with
wait bool Wait for the process to exit
stdout string An array to place stdout, split by lines
log bool Log errors
Résultat int

RunClientEXE() public static méthode

Run an EXE located in the client's directory
public static RunClientEXE ( string file, string param, bool wait = true, bool log = true ) : int
file string The name of the EXE to run
param string Parameters to run the EXE with
wait bool Wait for the process to exit
log bool Log errors
Résultat int

RunClientEXE() public static méthode

Run an EXE located in the client's directory
public static RunClientEXE ( string file, string param, bool wait, string &stdout, bool log = true ) : int
file string The name of the EXE to run
param string Parameters to run the EXE with
wait bool Wait for the process to exit
stdout string An array to place stdout, split by lines
log bool Log errors
Résultat int

RunEXE() public static méthode

Run an EXE
public static RunEXE ( string filePath, string param, bool wait = true, bool log = true ) : int
filePath string The path of the EXE to run
param string Parameters to run the EXE with
wait bool Wait for the process to exit
log bool Log errors
Résultat int

RunEXE() public static méthode

Run an EXE
public static RunEXE ( string filePath, string param, bool wait, string &stdout, bool log = true ) : int
filePath string The path of the EXE to run
param string Parameters to run the EXE with
wait bool Wait for the process to exit
stdout string An array to place stdout, split by lines
log bool Log errors
Résultat int