The techie in me RSS 2.0
 Tuesday, June 27, 2006

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(); 
Tuesday, June 27, 2006 12:20:39 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -

Comments are closed.
About me
Name : Rujith Anand Send mail to the author(s)
Archive
<February 2012>
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
26272829123
45678910
Blogs I read
Disclaimer

Disclaimer
Postings are provided as is with no warranties, and confer no rights. Opinions expressed here are my own delusions; my employers at best shake their heads and sigh, at worst repudiate the content with extreme prejudice, whenever it manages to appear on their radar.

© Copyright 2012
Rujith Anand

Statistics
Advertisement
All Content © 2012, Rujith Anand