Link to home
Start Free TrialLog in
Avatar of Richard Korts
Richard KortsFlag for United States of America

asked on

Run local app from browser link

Hi,

We are trying to get a local app (on an XP PC in either IE or FireFox) to initiate from a browser.

We have a link on the webpage, coded like this:

"file://localhost/C:/Documents%20and%20Settings/Richard/Desktop/LSStext/LSSRobot.fp7";

We also tried "file:////C:/Documents%20and%20Settings/Richard/Desktop/LSStext/LSSRobot.fp7";

Neither works.

Is there a way to make this happen?

(note, fp7 is FileMaker Pro).

Thanks
SOLUTION
Avatar of George Khairallah
George Khairallah
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
<a href="//webpath/LSSRobot.fp7">FileMaker Pro</a></div>
Avatar of Richard Korts

ASKER

To gkhairallah

Here is my EXACT code:

            <tr>
            <td align="center"><a href="file://C:/Documents%20and%20Settings/Richard/Desktop/LSStext/LSSRobot.fp7">Prepare for Ipads</a></td>
            </tr>

It does NOTHING. No error, nothing.
I use a symbolic that is updated in the code behind to change the web path.  For example, in my development environment it resolves to  "localhost:3369".    So the actual link wouold look like this:  <a href="//<%=webPath%>LSSRobot.fp7">FileMaker Pro</a>.   Because It did not specify "http", this works for both http and https because the system automatically substitutes the correct protocol (on development we use http but in production we use https).
To MajorBigDeal

What is "webpath"? How does it know what that is?
MarjorBigDeal's suggestion is good for versatility. So I would use that if you can.
Also, just as a note, using the file:// link is not too generic, meaning, if someone tries to open that link on a mac, it'll go nowhere. Granted, it looks like you're using it with FileMaker Pro on the PC. so in this particular instance, it may not be a big issue.

In any case, regarding the fp7. Do you have the file handlers setup correctly on the workstation on which you're clicking that link?
For testing, what happens if you point it to a different link that is, say, a text file? does that work? or are you getting the same result?
To all:

I tried it with a text file in the same folder path.

Nothing.

I would try MajorBigDeal but I don't know my equivalent of his port # 3369 (localhost:3369). How do I get that?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
So the correct path on the server is the same as the path that you would enter into the browser bar (which is why it works).  But even though you are pointing at the server, the application actually opens on the workstation, which is what you want.
To MajorBigDeal

OK, but how do I code that to work in my case? I'm using php. I gather you're using dot net or asp classic?

FYI (to both), the app is running in a controlled environment on an XP PC using IE. I DO NOT have to have it working cross browser / cross platform. Just this SPECIFIC case.

rkorts
The example I used was probably a bad choice, it is the path to run on the development workstation.   If you are still having trouble determining the path,  let us know.
>> I'm using php. I gather you're using dot net or asp classic?

Yes, but it will work anyway, albeit with slightly different format.  

>> Just this SPECIFIC case.

Just to make sure, your webserver, is on a different machine than the client, is that correct?
MajorBigDeal

Yes, the web server is a commercial host (1 & 1).

Thanks to you both. I will award points even if it can't be made to work.

FYI, my colleague (the FileMaker expert) has it working on his machine, but he's using Windows 7 and (I think) IE 7 or earlier.

rkorts
Avatar of Dave Baldwin
"file://" will work if it is in a file that is invoked by "file://".  If it is invoked with "http://" like from an outside webserver, then it won't work because that violates what is called the 'same domain' security policy.  That policy is intended to prevent pages from other people's web sites from getting to the files on your computer.  All the browsers have implemented that policy.
You're welcome,  so if I understand correctly, the client machine is XP.  I think this should work regardless of browser.   As a first step,  put a document of type fp7 under the web server (not the client).  Then manually enter a path into the browser on the client to open that document.  Can you get that step working?  Then we can move on from there.  I'll be back in  a few hours.
Hmm...  you said the webserver is a commercial host, and I was looking at your path, and it looks like it is static, which means that link will only work for you, and your workstation only. Is this what you really need/want to do?  
Also, regarding the file://  issue, as DaveBaldwin mentioned, an easy test would be to try and place your site's URL in the trusted sites zone, and see if it works, it could be a security issue on your workstation that is preventing it from working.
There is also another issue which is that even if the web server was on that machine, the file is in someone's personal profile area.  You can't normally give 'Everyone' permission to access someone else's files in "C:/Documents%20and%20Settings/Richard/".  It's probably working for the developer because it's under his login on his machine.
To MajorBigDeal

You want me to put a FileMaker Pro file on the web server?

I'll try that, but I can't POSSIBLY see how that can work. The browser is not going to be able to recognize or manage that file type.

I think we are going down the wrong path here, I sense confusion on the part of some.

FileMaker Pro is an application that runs on Windows (& other platforms). It is running on my machine, the path to the SPECIFIC file I am trying to reference is the one listed above (under C:/Documents and Settings, etc.).

We are building an application that is part web server & part iPad. The customer schedule database is on the web server. Daily, the appointments for that day are to be downloaded to an XP PC running FileMaker.

All we are trying to do here is MINIMIZE the number of steps the customer Service Manager needs to take to get the files ready for download to the individual service tech iPads. We thought if we could initiate the running of a FileMaker script (LSSRobot.fp7) from the web browser window that provides for the final schedule to be downloaded & saved onto the PC, it would save a step.

Obviously, from these exchanges, that is NOT a simple thing to do.

My co-developer (who is 8 time zones away from me) has this process working on his PC, which is Windows 7 & IE.

So it seems to me something is wrong with my browser configuration, or my XP config, or something like that.

rkorts
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
To DaveBaldwin

The iPads run FileMaker (called FileMaker Go), that is wshy we choose this approach.

That's fine, we will go the extra step.
Your best option is to publish the schedule to the web site and let them download it from there.
To all,

I am trying to close this & aeard points.

It will NOT allow me to award multiple solutions.

This new EE interface is a PAIN!!!
the reason is as DaveBaldwin explained: SOP - same origin policy
some browsers can be tweaked to load such files anyway if the user allows it
i.e in mozilla-based browsers with
  netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
or in chrome with command-line option --allow-file-access-from-files
>> You want me to put a FileMaker Pro file on the web server?

No.  Serving a document with the appropriate extension will open the application on the client workstation, not the server.
Good for effort.

It seems odd to me that my colleague has it working in IE under Windows 7, yet some of you say it "can't be done".
We have this working here.    You are right that this is not clear cut.  We do serve " file:// " links but only to files that are shared on servers.  We never serve links to specific files on a workstation.  As someone pointed out that might work in special cases but isn't a reasonable solution in general.

We are also using the approach I described and it works very well to open applications on the user's workstation.
rkorts, you don't seem to get the SOP- same origin policy.  Details are important here.  You could make it work on your Own computer under your Own login if the page is originally loaded with 'file://'.  What is blocked is accessing the local file in the browser from a page that is loaded from an external web site using 'http:'.  That is done to keep external web sites from stealing your local files.  Can you make exceptions?  Yes... but the exceptions have to be done in Each Users Browser, not from the server.

And by the way, we answer this same question here about twice a week.