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.
 
Joined
Jan 18, 2009
Messages
1
Reaction score
0
Javascript printing

Hi,

I wanted to print some text from my page to a client printer in my intranet application. For this, I wanted create object of Shell.Application. In intranet, I think I can change the security settings for my client browsers.

Please give me, if you have some sample code for this.

thanks,
rcm
 

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

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top