Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

HTML Link to Open Folder on Current User's Desktop

Posted on 2014-04-09
7
Medium Priority
?
988 Views
Last Modified: 2014-04-09
We have a web interface that loads on laptops.  It's a launch point for many apps we use.

I need to discover a link that will open a folder on the current user's desktop.

The folder is called "Dept Apps"

How can we do this?

Thanks..

David
0
Comment
Question by:DWStovall
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 2000 total points
ID: 39989525
You probably can't.  Current browser security prevents you from accessing the local machine from a page that was loaded from a web site.  You might be able to do it with IE (Internet Explorer) if you have all the permissions right but no other browser will let you do that.
0
 
LVL 23

Expert Comment

by:Patrick Bogers
ID: 39989531
Link to "C:\Users\%username%\Desktop\Dept Apps"

Link need the quotation marks " since there is an empty space in it.
0
 
LVL 23

Expert Comment

by:Patrick Bogers
ID: 39989538
I tested this simple piece of code and it opens my desktop (since here is no folder Dept Apps

<html>
<head> test
</head>

<body>
<a href=""C:\Users\%username%\Desktop\Dept Apps"">Link text</a>
</body>
</html>

Open in new window

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 39989562
But does it open when you load it from a web server instead of from you local files?  That's what the security restriction is about, preventing remote sites from getting into your computer.  There are some methods available in IE and AD with Sharepoint apparently, but not from just any web server and browser.
http://code.google.com/p/browsersec/wiki/Part2
0
 

Author Comment

by:DWStovall
ID: 39989900
@ Patricksr1972,

I tried the simple piece of code, and I got the same response - even with a few variations, all it would open is the "Desktop" folder.  It shows the "Dept Apps" folder, but it won't open it.

This is a launch page from one of our local internal (intranet) servers.  It's not coming from an outside entity - it's a "trusted site".  Folks use this website as a link point to PDF documents, other web pages, etc.  Why can't it open a folder on the desktop?

Thanks for your response.
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 39989997
In this case, anything that is loaded with 'http://' is not allowed to load anything with 'file://' because it is a security risk.  Your browser can't tell that it is trusted unless you're using a version of IE that includes that function.  In addition, I don't think your user permissions that give you access to your desktop are transferred to operations in your browser.

Links to other pages and PDF's on the server are under different security permissions.  They would be 'http://' links which are ok to open from pages that are loaded using 'http://'.
0
 
LVL 54

Expert Comment

by:Scott Fell, EE MVE
ID: 39990678
I know this is after the fact, but you can use a java applet to do this.  

http://docs.oracle.com/javase/tutorial/deployment/applet/security.html
Sandbox applets cannot perform the following operations:
They cannot access client resources such as the local filesystem, executable files, system clipboard, and printers


Privileged applets do not have the security restrictions that are imposed on sandbox applets and can run outside the security sandbox.

I currently use an applet to access a local printer programatically.  

I am not a java dev and have not verified these links  and only did a quick search but some examples below.*

http://www.coderanch.com/how-to/java/HowCanAnAppletReadFilesOnTheLocalFileSystem

http://faculty.kutztown.edu/spiegel/CSc421/SigningAnApplet.htm

*In order to prevent the browser from throwing an error, you must get a certificate for your applet http://docs.oracle.com/javase/tutorial/deployment/doingMoreWithRIA/security.html
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
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 +…

604 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