What I mean is, when user click a button on a webpage, a program which has already installed on his computer would be executed. I also need to pass some command line para
This isn't possible for blatantly obvious security reasons.
Make a central database, tell your destop app to connect to that while web app will be connecting to that too .. so they can meet in the park
You can register a protocol to your application so that navigating to a URL beginning with that scheme will launch your application and run a command.
If your clients use Internet Explorer you could write an ActiveX control.
This is not possible. If it was, it would be a huge security breach.
Imagine being able to let the user click a button on the webpage and as a result format his harddrive with the standard format command? I bet you wouldn't want that happening to yourself.
Maybe you can think about exposing a webservice from your webapplication and let the desktopclient look at that webservice?
The way to do it is to register a MIME type handler for your application that is installed on the desktop. This is straightforward but different for each platform. Then, when you want to have the program run, you send a document to the user of your given MIME type.