代码
IWshRuntimeLibrary.WshShellClass shell = new IWshRuntimeLibrary.WshShellClass();
object a = 1, b = 0;
shell.Run("notepad.exe", ref a, ref b);
System.Threading.Thread.Sleep(100);
shell.SendKeys("%f", ref b);
System.Threading.Thread.Sleep(100);
shell.SendKeys("^x", ref b);
object a = 1, b = 0;
shell.Run("notepad.exe", ref a, ref b);
System.Threading.Thread.Sleep(100);
shell.SendKeys("%f", ref b);
System.Threading.Thread.Sleep(100);
shell.SendKeys("^x", ref b);