hi to all, i am new to .Net Development. My requirement was executing an application whenever the service starts. i need to do it in C#. please help.i don't know how to do that . if u have any reference specify that also.
thanks in advance
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
venkatesh pPosted Feb 14, 2008, 12:47 AM
Scott LyslePosted Feb 13, 2008, 4:20 AM
protected override void OnStart(string[] args) { System.Diagnostics.Process.Start("iexplore.exe", "http://www.msn.com"); } Process.Start accepts a couple of arguments, the first is the executable to launch (e.g., iexplore.exe in this example) and the second argument is any optional arguments that the executable may use (in this case, a URL). Of course the executable can be any executable and may include a full path to that executable and the arguments to the executable are optional.