Starting .msc files from .net application.
When writing code, lot of times we have come across situation where we want to start event viewer or any other application which uses management console . The code below shows how to start event viewer from .net application. This can be used to start services.msc or any other similar files.
Process traceFileViewerProcess = new Process();
string executable = Environment.ExpandEnvironmentVariables(@"%SystemRoot%\system32\eventvwr.msc");
traceFileViewerProcess.StartInfo.FileName = executable;
traceFileViewerProcess.StartInfo.Arguments = "/s";
traceFileViewerProcess.Start();