how to excute exe

  • Thread starter Thread starter Yoshitha
  • Start date Start date
Y

Yoshitha

Hi
i've one exe ( got through vb.net) and i want to execute this exe file
through my asp.net application and i wrote the following lines of code in
the button click event to run the exe but when i click on button it is not
running that exe i've given

shell("E:/project/windowsapplication1.exe",AppWinStyle.NormalNoFocus) ( i
wrote this statement in webform)

Can anubody tell me how to solve this problem.

Thanx in advance
Yoshitha
 
ASP.NET application default runs in ASPNET/Network Service account which
does not have rights to execute files.

You should impersonate to another account in order to run it.
 
Most of time, it is a bad idea to run exe from ASP.Net web pages.

If possible, try to convert the app into class library or even com object.
The ASP.Net execution won't "click" for you...

Your sample make me think you are trying to execute the app on the CLIENT
side.
Is it rigth ? If yes you should realy think about other way since IE or
other browsers run in a sandbox environment...

Steve
 
That looks like VB.NET, but that syntax should only
work in a Windows form.

To run an exe from a web form, you normally use Process.Start



Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================
 
shell("E:/project/windowsapplication1.exe",AppWinStyle.NormalNoFocus) ( i
wrote this statement in webform)

What is this? What are you programming in?

Eliyahu
 

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