?
Solved

HTML Link to Open Folder on Current User's Desktop

Posted on 2014-04-09
7
Medium Priority
?
851 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
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

 
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 53

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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.
Suggested Courses

764 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