Solved

HTML Link to Open Folder on Current User's Desktop

Posted on 2014-04-09
7
601 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 83

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 83

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 83

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Chrome NET_ERR_CERTIICATE_TRANSPARENCY_REQUIRED 2 169
Full Screen problem when auto scale IFRAME 2 55
Form Submit falis 6 24
compact pure CSS Read More Toggle 4 19
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

930 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

13 Experts available now in Live!

Get 1:1 Help Now