RUNNING WINDOWS APPLICATION FROM ASPNET...

B

BLOOD...

I want to run notepad.exe from ASP.NET (C#)
i am using javascript:
<script language="JScript">
function fnShellExecuteJ()
{
var objShell = new ActiveXObject("Shell.Application");

objShell.ShellExecute("notepad.exe", "", "", "open", 1);
}
</script>

ERROR: Permission Denied..


Please HELP ME!!:..

Thanks
 
C

Craig Deelsnyder

BLOOD... said:
I want to run notepad.exe from ASP.NET (C#)
i am using javascript:
<script language="JScript">
function fnShellExecuteJ()
{
var objShell = new ActiveXObject("Shell.Application");

objShell.ShellExecute("notepad.exe", "", "", "open", 1);
}
</script>

ERROR: Permission Denied..


Please HELP ME!!:..

Thanks

Since you're using Javascript, that runs on the client. Javascript
doesn't have access to open programs on the users' side. I believe
there may be a way to play with permissions in the browser to allow
this, but are you going to be able to influence the users' browser settings?
 
S

Steve C. Orr [MVP, MCSD]

Craig is right.
This is all controlled by the user's browser security settings.
This is a good thing. Would you want web sites running any application they
want on your machine?
If this is an intranet you may be able to affect policy to change the
settings to meet your needs. Otherwise you're S.O.L.
 

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

Top