0
thanks for your reply. i got it. but when i start the service "it shows some errors " please help me to rectify that. the errror was service could not be started on this computer . since no timely fashion reply from service.
0
You can start by overriding the OnStart event for your service; in that code you can use Process.Start to kick on some other application (in the below example, I start internet explorer and pass it the URL for MSN as a argument so that whenever the service starts, it opens up MSN in an explorer window)
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.