using System; using System.Diagnostics; public class Test { public static void Main() { var info = new ProcessStartInfo() { FileName = @"cmd.exe", Arguments = @"/K ""C:\MyLovelyFolder\HP Smart.lnk""", UseShellExecute = true, CreateNoWindow = true, WindowStyle = ProcessWindowStyle.Hidden }; Process.Start(info); } }
Standard input is empty
Standard output is empty
Unhandled Exception: System.ComponentModel.Win32Exception (0x80004005): Cannot find the specified file at System.Diagnostics.Process.StartWithShellExecuteEx (System.Diagnostics.ProcessStartInfo startInfo) [0x00102] in <e8eb3d7a311640f484845e45cbec8973>:0 at System.Diagnostics.Process.Start () [0x00032] in <e8eb3d7a311640f484845e45cbec8973>:0 at (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start() at System.Diagnostics.Process.Start (System.Diagnostics.ProcessStartInfo startInfo) [0x0001b] in <e8eb3d7a311640f484845e45cbec8973>:0 at Test.Main () [0x00033] in <f2df930ae1df43e6830b22836c6bd9e9>:0 [ERROR] FATAL UNHANDLED EXCEPTION: System.ComponentModel.Win32Exception (0x80004005): Cannot find the specified file at System.Diagnostics.Process.StartWithShellExecuteEx (System.Diagnostics.ProcessStartInfo startInfo) [0x00102] in <e8eb3d7a311640f484845e45cbec8973>:0 at System.Diagnostics.Process.Start () [0x00032] in <e8eb3d7a311640f484845e45cbec8973>:0 at (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start() at System.Diagnostics.Process.Start (System.Diagnostics.ProcessStartInfo startInfo) [0x0001b] in <e8eb3d7a311640f484845e45cbec8973>:0 at Test.Main () [0x00033] in <f2df930ae1df43e6830b22836c6bd9e9>:0