How to open a folder in windows from web page on localhost? - windows

I know you can't open/link local resources from the browsers for security reasons, but i wonder how google does that.
If you ever used Google Desktop, you know you can search your computer from a web page, and yes, you can open files, folders etc. How is that?
Anyone?

Related

Firefox extension app hosted on server

I managed to create a Chrome extension pretty easy and the main application is hosted on my server allowing me to provide updates to the app itself without having to update the whole extension. I like the idea and I just want to know if it's possible to create a similar extension for Firefox where the main application is hosted on a live server.
In creating my Chrome extension, I followed a tutorial. The code for Chrome is included on the linked page.
It's possible to create a simple extension that loads a web app either in a panel or a tab. You should read up on the Addon SDK documentation, including the panel, tabs and getting started docs.
There is nothing wrong with this, as the web app would not have direct access to internal Firefox APIs. If you read the Addon guidelines closely that #makyen links to above, none of it covers this implementation detail. In their defence, they seem to have misinterpreted what you want to do. It looks to me like you just want to integrate / launch your web app from the browser UI?
Web application:
After finding the tutorial (please provide a link next time) I surmise you are referring to in your question, I suspect that what you are actually attempting to convey is different than how I initially interpreted your question. I have edited the question to make this more clear to people reading it in the future.
That tutorial is explaining how to place a link to a web application into the Chrome user interface. Such is, to a large extent, just a bookmark that is able to be placed within other areas of the user interface than the bookmarks bar.
If that is what you are wanting to do, then, yes, you can easily do so in Firefox. Given that the extension is not running external content in the security context of an extension (you are effectively just navigating to and displaying a website), then that should be fine as a Firefox extension. Note that you need to be sure that you are not granting elevated permissions when you launch the web application.
If running a web application is what you are wanting to do, then I suggest you might want to use different semantics to refer to what you are doing. The above is not a "Firefox extension app hosted on server". Saying it that way strongly implies that you are hosting the actual extension code on your own server. The rest of your question implies that the extension dynamically loads external code and runs it. I would suggest that you refer to it as something like: a web application that is launched (navigated to) by a Firefox extension allowing the web application to be started from an icon in the toolbar.
Extension running web sourced code:
However, if what you are wanting to do is have external content running as a Firefox extension, then implementing that functionality is a large security hole for anyone installing the extension. Even assuming that your intentions are totally benign, there is a huge security hole for anyone who is intercepting your traffic, or gains control of your server to inject code into Firefox that runs at the level of an extension (i.e. the malware can have full control of the browser and then of the computer).
Yes, it is currently possible for you to write this for Firefox.
However, given that the extension pulls code from something not packaged within the extension, the extension will never be permitted to be hosted on AMO.
In addition, the plan is that later this year there will be mandatory signing of Firefox extensions through Mozilla. I doubt that an extension like this will be permitted at that time.
You can read a set of Add-on guidelines on MDN.

Launch Windows Explorer from web application in browser

I’m building a PHP web application that runs only using Google Chrome. The organization would like to be able to access certain folders via windows explorer. This is easy in IE using the file:/// protocol but I can’t seem to find a good solution using Chrome.
I’ve looked into registering custom protocol handlers but haven’t really found the answer I’m looking for there. This requirement is grained in stone; they do not want to access the files via web browser.
Does anyone know if there’s a way to launch windows explorer from google chrome either through a special protocol handler or by temporarily launching IE to get the file path to open? A simple method or example would be greatly appreciated!
Thanks in advance.

Is it possible to use local resources from a web-delivered XUL app?

Is there a way to execute a XUL program delivered via "trusted" web site outside of the browser sandbox?
My XUL program executes beautifully in local XULRunner and in firefox with the -add parameter.
Now, I'd like to put it on my secure intranet and allow users to click a button which will launch it. My app has behaviors that access local resources such as .exes, so it seems like the browser sandbox will prohibit the app from carrying out those behaviors. But I'd really like to create a browser-based launchpad for this app. And since I'm hosting it on my intranet, which is trusted in my users' browsers, it seems like it should be possible.
Mozilla's documentation says "It is also possible to open XUL files directly from the file system or from a remote web site; however they will be restricted in the kinds of operations they can do, and some aspects of XUL will not work." But given that "Remote XUL is DEAD", I need a way to kickoff my local XUL app without executing XUL in the browser.
If not, is there a firefox extension that could run this XUL app?
To elaborate on my initial comment, turn your app into an extension (although most of the steps should be familiar to you already) and then secure your updates.

Is it possible to access Win API from Firefox/Internet Explorer toolbar extention?

We have an idea to develop a toolbar for major browsers on Windows.
The toolbar will be a compliment for our weather application.
We want the toolbar to have an access to Windows API, specifically we need Registry and file system access (want access main app user settings).
Is it possible with Firefox and Internet Explorer toolbar extentions?
Browser toolbar development is new grounds for me.
I just want to know if it makes sense to start the project.
You can access the registry and filesystem from Firefox using the existing XPCom interfaces that are already exposed for you.
Internet Explorer plug-ins are all native, so you're already writing Win32 and COM, so you just call whatever API you need. However, since you are most likely running in a low integrity process, you need to read this which will explain the limitations on registry and filesystem access that you will encounter. If you describe exactly what registry and filesystem locations you're interested in, I can give you a more detailed answer.
The filesystem can be accessed from a Firefox extension:
File System access from Firefox Extension
I don't know about Internet Explorer, but that seems like it would make sense.
As for Registry access in Firefox, see this:
https://developer.mozilla.org/en/accessing_the_windows_registry_using_xpcom
It sounds like it should all be possible. I didn't find anything about Internet Explorer, but it seems like that would be a feature that they would include. I don't like to mess with the registry since that is not cross-platform, but if you really need the user settings, then I guess you have a valid reason. Just remember that not all of your users will be using Windows, and Mac OS doesn't have a registry (neither does Linux), so try not to restrict yourself too much if you can avoid it.

internet connection problem

I am using Visual Web Developer express and when I try to display the webpage I'm working on in a browser Internet Explorer cannot find the page. When I ask Internet Explorer to diagnose the problem I got the message ""localhost" is not set up to extablish a connection on port "52429" with this computer."
Any ideas what to do?
Not sure if I understand your question correctly.
Your web page is probably stored on the local hard disk, but you are trying to access it thru some sort of server running on your PC.
Web browser can actually load pages from the hard disk. For example, if your page is in c:\test, you could just type "c:\test\index.html" into the address bar.

Resources