http://stackoverflow.com/questions/813086/can-i-send-a-ctrl-c-sigint-to-an-application-on-windows https://msdn.microsoft.com/en-us/library/ms686016(VS.85).aspx private void Button1_OnClick(object sender, RoutedEventArgs e) { var file = new FileInfo(@"C:\temp\video.mp4"); if (file.Exists) { file.Delete(); } ct = new CancellationTokenSource(); Task.Factory.StartNew(() => { var pInfo = new ProcessStartInfo("cmd.exe", string.Format("/c {0} \"{1}\"", new object[] {"adb.bat", file.Name})); pInfo.CreateNoWindow = true; pInfo.UseShellExecute = false; pInfo.RedirectStandardError = true; pInfo.RedirectStandardOutput = true; pInfo.RedirectStandardInput = true; var p = Process.Start(pInfo); ...
댓글
댓글 쓰기