execute an exe program on the browser local machine?

R

rockdale.green

Hi, All

I am try to launch a program from a button on my asp.net page. Let's
say the program is NotePad.exe. and I came across this article.
http://support.microsoft.com/default.aspx?scid=kb;en-us;555134 and
follow the step in the article but could get it works.
First of all: I am quite confused here, as we knoe the asp.net is got
execute on IIS server. Does that mean the NotePad.exe is executing on
the server machine but on the client side (the desktop with the
browser)?

Anyway, I follow the steps in the article:
change the processModel in machine.config file and set the userName as
"SYSTEM". Stop and start IISAdmin service. But when I execute

Private void cmdTest_Click(object sender, System.EventArgs e)
{
try
{
System.Diagnostics.Process.Start("Notepad.exe");
}
catch(Exception ex)
{
String str = ex.Message.ToString();
}

The error message is Access is denied.

Is what I am trying to do reasonable and it it is, how? Thank you very
much
}
 
J

jasonkester

Wow. That's a truly terrible idea, and probably not what you're
actually wanting to accomplish.

The code you supplied will attempt to fire up a new copy of Notepad on
the web server. On your dev box it might look like it's working right,
but if you ever put it into production, you'd find yourself driving out
to your CoLo facility and frantically closing a thousand windows.

Now, it looks like your real intention is to open Notepad on your
client's side. This is potentially even more disastrous. Luckilly, no
modern browser will allow such a thing. For an explanation as to why,
take a quick look at the scary executables sitting right next to
notepad.exe in your Windows directory!

Jason Kester
Expat Software Consulting Services
http://www.expatsoftware.com/
 
J

jasonkester

Incidentally, I worked with an ISAPI developer once who would debug his
filters using a similarly insane strategy. He would have his ISAPI
Filters pop up windows messageboxes with integer codes, and observe the
order in which they appeared.

I actually watched the guy run into the server room and start
frantically closing messageboxes after deploying a 'debug' version of
the .dll to the production server! Of a major application service
provider! On purpose!!!

Jason Kester
Expat Software Consulting Services
http://www.expatsoftware.com/
 
R

rockdale.green

Hi, Jason:

Thanks for the clearify. That's what I need to convince my customer.
Well, Have u ever used the Microsoft Office Web Object, you can embed
the object in your asp page and draw charts, bar, pie diagrams. One of
the object property is you can set its place as Server or Client. I
have done a project that the customer rejected to install this
component on their IIS server and given their end user always has
Office installed on their desktop. So actually the browser is calling
the dll on the client desktop. I do not know how it works maybe because
they are both Microsoft products. Now my customer want they can call
their old windows application (on their desktop) from our web page,
it's intranet and security is not their concern right now. I guess the
answer is NO???

Thanks for your reply
 
C

Coldman

maybe it could be done w/ ActiveX or signed Java applets or a custom browser
plug-in
 

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

Members online

No members online now.

Forum statistics

Threads
473,781
Messages
2,569,616
Members
45,306
Latest member
TeddyWeath

Latest Threads

Top