Solved

HTML Link to Open Folder on Current User's Desktop

Posted on 2014-04-09
7
586 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
7 Comments
 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 500 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 19

Expert Comment

by:Patricksr1972
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 19

Expert Comment

by:Patricksr1972
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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 82

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 82

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 52

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

746 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

12 Experts available now in Live!

Get 1:1 Help Now