Answers for "c# start a process and close"

C#
2

c# start process and wait for exit code

public virtual bool Install(string InstallApp, string InstallArgs)
    {
        System.Diagnostics.Process installProcess = new System.Diagnostics.Process();
        //settings up parameters for the install process
        installProcess.StartInfo.FileName = InstallApp;
        installProcess.StartInfo.Arguments = InstallArgs;

        installProcess.Start();

        installProcess.WaitForExit();
        // Check for sucessful completion
        return (installProcess.ExitCode == 0) ? true : false;
    }
Posted by: Guest on November-08-2020
1

how to close an application in c#

this.Close();
//This only close the current form or window that you are using.
Posted by: Guest on July-18-2020

C# Answers by Framework

Browse Popular Code Answers by Language