fork download
  1. using System;
  2. using System.Diagnostics;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. var info = new ProcessStartInfo()
  9. {
  10. FileName = @"cmd.exe",
  11. Arguments = @"/K ""C:\MyLovelyFolder\HP Smart.lnk""",
  12. UseShellExecute = true,
  13. CreateNoWindow = true,
  14. WindowStyle = ProcessWindowStyle.Hidden
  15. };
  16. Process.Start(info);
  17. }
  18. }
Runtime error #stdin #stdout #stderr 0.04s 35392KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
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