Below is I use the Process start the program code,
Private static void Start (string filePath)
{
The FileInfo the FileInfo=new the FileInfo (filePath);
if (! The fileInfo. Return the Exists);
The Process dataCenterProcess;
DataCenterProcess=new Process ();
DataCenterProcess. StartInfo. FileName=the fileInfo. FullName;
DataCenterProcess. StartInfo. RedirectStandardInput=true;
DataCenterProcess. StartInfo. RedirectStandardOutput=true;
DataCenterProcess. StartInfo. CreateNoWindow=true;
DataCenterProcess. StartInfo. UseShellExecute=false;
DataCenterProcess. StartInfo. WorkingDirectory=the fileInfo. DirectoryName;
DataCenterProcess. Start ();
}
CodePudding user response:
Start the program with a Process, the used again after the first use of Ef Ef operation quickly, Ef action part shouldn't be a problem, because when manually start the program simply won't appear this problemCodePudding user response:
(it's even... I found the reason, the reason is the Process. The StartInfo. RedirectStandardInput=true and Process. The StartInfo. RedirectStandardOutput=true; This two question,I changed to False will not appear again after waiting for long time.