run an exe on page load

  • Thread starter Thread starter sonu
  • Start date Start date
S

sonu

I have created an web page.

I want run an exe when i click any button on that page.

any help please

Regards
Amit Mishra
 
check out the 'Start' method on the Process class in the System.Diagnostics
namespace, remember you will have to grant the required permissions to start
the program from asp.net.

HTH

Ollie Riches
 
suppose i have con.exe and i hv a button "run" on web oage when i click
"run" that exe should run.

if u give some Code related help that will be good for me.

Regards
Sonu
 
Could be simple as :
System.Diagnostics.Process p =
System.Diagnostics.Process.Start(@"C:\something.exe");
p.WaitForExit();

Please note you wont see the app running, but it will be in your process
list in task manager (if it is still running...)
 
Amit,

Do you want your process to run on the user's machine that is viewing
the page, or on the web server? If the answer is the former, then you will
have to install something on the machine (an active x control, or an
embedded windows control with the proper security permissions) to do this.

If the answer is on the server, then Ollie's answer is the correct one.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top