Search code examples
c#processcommandexecutemicrophone

How do I execute command in c#?


I want to execute command to call microphone config.

control mmsys.cpl,,1

I try following code but I throw Win32Exception, The system cannot find the file specified.

Process.Start("control mmsys.cpl,,1");

Solution

  • It should be:

    Process.Start("control","mmsys.cpl,,1")
    

    Documentation: http://msdn.microsoft.com/en-us/library/h6ak8zt5.aspx