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
Richard KortsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

 
George KhairallahCTOCommented:
Are you getting an error with this? can you post the code for it?  is it an HTML? by the looks of the line terminator, it looks it's in PHP?  
<a href="file://C:/Documents%20and%20Settings/Richard/Desktop/LSStext/LSSRobot.fp7">test</a>

Open in new window


The above code worked fine for me in Firefox and IE.
0
 
MajorBigDealCommented:
<a href="//webpath/LSSRobot.fp7">FileMaker Pro</a></div>
0
 
Richard KortsAuthor Commented:
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.
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
MajorBigDealCommented:
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).
0
 
Richard KortsAuthor Commented:
To MajorBigDeal

What is "webpath"? How does it know what that is?
0
 
George KhairallahCTOCommented:
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?
0
 
Richard KortsAuthor Commented:
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?
0
 
MajorBigDealCommented:
@gkhairallah - thanks for the upvote.

@rkorts - the webpath is the location of a "placeholder" document on the server.  By opening the document the appliction runs on the workstation.  So from the user point of view they click on the link and it opens the desired application on their workstation.
0
 
MajorBigDealCommented:
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.
0
 
Richard KortsAuthor Commented:
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
0
 
MajorBigDealCommented:
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.
0
 
MajorBigDealCommented:
>> 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?
0
 
Richard KortsAuthor Commented:
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
0
 
Dave BaldwinFixer of ProblemsCommented:
"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.
0
 
MajorBigDealCommented:
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.
0
 
George KhairallahCTOCommented:
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.
0
 
Dave BaldwinFixer of ProblemsCommented:
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.
0
 
Richard KortsAuthor Commented:
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
0
 
Dave BaldwinFixer of ProblemsCommented:
No, I'm afraid your concept is blocked by security restrictions.  In a page from a web site in a browser, you can't run a local file or program.  You Might be able to set 'fp7' to have a file association in the web browser... except that I don't think the iPad will run FileMaker.  What format is "the final schedule" that is downloaded to the iPads?
0

Experts Exchange Solution brought to you by ConnectWise

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
 
Richard KortsAuthor Commented:
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.
0
 
Dave BaldwinFixer of ProblemsCommented:
Your best option is to publish the schedule to the web site and let them download it from there.
0
 
Richard KortsAuthor Commented:
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!!!
0
 
ahoffmannCommented:
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
0
 
MajorBigDealCommented:
>> 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.
0
 
Richard KortsAuthor Commented:
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".
0
 
MajorBigDealCommented:
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.
0
 
Dave BaldwinFixer of ProblemsCommented:
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.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.