How should I call an exe file using C#
-
I could not find any function in C# that allows to call exe files. I need some function that does the equal of Visual C 6's WinExec (strCommand, nCmdShow). e.g. WinExec ("calc.exe", 0); opens the windows calculator and WinExec ("notepad.exe", 0); opens the notepad. Some same stuff in C# ????
-
I could not find any function in C# that allows to call exe files. I need some function that does the equal of Visual C 6's WinExec (strCommand, nCmdShow). e.g. WinExec ("calc.exe", 0); opens the windows calculator and WinExec ("notepad.exe", 0); opens the notepad. Some same stuff in C# ????
-
I found it in MSDN and ExecCommand (strCommand, strArgs); but I do not know in which namespace they exists. The msdn page that show the description of this method does not tell the namespace requirements. If you know please do let me know.
-
I found it in MSDN and ExecCommand (strCommand, strArgs); but I do not know in which namespace they exists. The msdn page that show the description of this method does not tell the namespace requirements. If you know please do let me know.
Exec is an internal method within the visual studio ide. For generic tasks, you should try the 'Process' object. You can find it in the 'System.Diagnostics' namespace. ex : Process.Start("IExplore.exe", "www.northwindtraders.com");
-
Exec is an internal method within the visual studio ide. For generic tasks, you should try the 'Process' object. You can find it in the 'System.Diagnostics' namespace. ex : Process.Start("IExplore.exe", "www.northwindtraders.com");
Thanks alot. it solved my problem