Solved

Run local app from browser link

Posted on 2012-04-10
27
1,175 Views
Last Modified: 2012-08-13
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
0
Comment
Question by:Richard Korts
  • 9
  • 9
  • 5
  • +2
27 Comments
 
LVL 10

Assisted Solution

by:George Khairallah
George Khairallah earned 200 total points
ID: 37828775
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
 
LVL 11

Expert Comment

by:MajorBigDeal
ID: 37828782
<a href="//webpath/LSSRobot.fp7">FileMaker Pro</a></div>
0
 

Author Comment

by:Richard Korts
ID: 37828810
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
 
LVL 11

Expert Comment

by:MajorBigDeal
ID: 37828812
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
 

Author Comment

by:Richard Korts
ID: 37828822
To MajorBigDeal

What is "webpath"? How does it know what that is?
0
 
LVL 10

Expert Comment

by:George Khairallah
ID: 37828844
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
 

Author Comment

by:Richard Korts
ID: 37828887
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
 
LVL 11

Assisted Solution

by:MajorBigDeal
MajorBigDeal earned 200 total points
ID: 37828913
@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
 
LVL 11

Expert Comment

by:MajorBigDeal
ID: 37828926
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
 

Author Comment

by:Richard Korts
ID: 37828934
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
 
LVL 11

Expert Comment

by:MajorBigDeal
ID: 37828937
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
 
LVL 11

Expert Comment

by:MajorBigDeal
ID: 37828946
>> 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
 

Author Comment

by:Richard Korts
ID: 37828976
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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 37829013
"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
 
LVL 11

Expert Comment

by:MajorBigDeal
ID: 37829023
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
 
LVL 10

Expert Comment

by:George Khairallah
ID: 37829034
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
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 37829059
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
 

Author Comment

by:Richard Korts
ID: 37829239
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
 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 100 total points
ID: 37829301
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
 

Author Comment

by:Richard Korts
ID: 37829363
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
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 37829384
Your best option is to publish the schedule to the web site and let them download it from there.
0
 

Author Comment

by:Richard Korts
ID: 37829390
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
 
LVL 51

Expert Comment

by:ahoffmann
ID: 37829655
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
 
LVL 11

Expert Comment

by:MajorBigDeal
ID: 37829913
>> 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
 

Author Closing Comment

by:Richard Korts
ID: 37830021
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
 
LVL 11

Expert Comment

by:MajorBigDeal
ID: 37830037
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
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 37830534
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

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Internet is a big network which is formed by connecting multiple small networks.It is a platform for all the users which are connected to it.Internet act as platform in different fields. Such as: Internet  as a collaboration platform. Internet  as…
Several part series to implement Internet Explorer 11 Enterprise Mode
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now