Click to See Complete Forum and Search --> : Access File System


sjm133
03-24-2003, 10:46 AM
I am writing a page for our local intranet in PL/SQL and need to provide a link to execute an application on the local client. I currently have an ActiveX that will find the path to the app and store it in a database so when the user returns the link is provided, if it is installed. I am providing the user with the following link:

<a href="javascript:openWin('file://c:/\progra~1/\primav~1/\projec~1/\pm.exe')" title="Client App">Client App</a>

The openWin function is as follows:

<SCRIPT LANGUAGE="JavaScript">
function openWin(url)
{
window.open(url);
}
</script>

When I click the link I get 'Access is Denied' error in lower left corner of IE. I can save the html source and put it on another server and it works fine as html.

I'm baffled, any ideas out there?

AdamBrill
03-24-2003, 12:31 PM
You can't run programs from the browser. That is a HUGE security risk... If you link to a .exe, it should popup a download dialog box not run the program. You might be able to do it with ActiveX, but I'm not sure...

sjm133
03-25-2003, 07:21 AM
I had this working at one time. You would be prompted to execute a couple of times and then it would run, I don;t know why it stopped though. I created another ActiveX that does the job. I just didn't want the extra work of doing that. I know it's a security risk but this is for intranet only (potentially 37,000 users, some intranet) and if the initial ActiveX runs then the second one should have no problems.

Thanks.

AdamBrill
03-25-2003, 08:13 AM
Is it poping up a download dialog box for you? If so, you could hit open and it would run the program. Would that work for you? Besides that, I don't know of any way to make it run a application from inside the browser...

sjm133
03-25-2003, 08:16 AM
No, that's the problem. All I got was a javascript error 'Access is Denied'. The popup asking to Run or Download would have been fine.

AdamBrill
03-25-2003, 08:27 AM
Could you post the rest of your code? I tried the part that you posted and it worked fine for me, so... One thing that you might want to change, though, is instead of using what you have, use this:

<a href="file://c:/progra~1/primav~1/projec~1/pm.exe" title="Client App">Client App</a>