Solved

Adding a UNC link to a printer in a HTML page.

Posted on 2008-06-17
5
1,066 Views
Last Modified: 2010-04-21
I'm currently writing a page for users to give them HTML links to printers which we have created on our print cluster.

the link i'm trying to create is  "\\SERVERNAME\PRINTERNAME", but whenever the i'm trying to add the link, it appears as "http:///SERVERNAME/PRINTERNAME".

Is there any way of presenting the information into HTML so that it loses the HTTP:// and doesn't reverse the "\"'s ???
 e.g. :

\\SERVERNAME\PRINTERNAME

Appears in the web page.

Many Thanks in advance

<TITLE>Printers</TITLE>

</HEAD>

<BODY>

<p><A HREF="/\\wvc-prtv-01\wvc-01-01-hplj4250">\\wvc-prtv-01\wvc-01-01-hplj4250</A></p></BODY>

</HTML>

Open in new window

0
Comment
Question by:mick_rouse
  • 2
  • 2
5 Comments
 
LVL 18

Expert Comment

by:Matthew Kelly
ID: 21810456
If you put "file:///" in the front of the"\\server-name" it will open from internet explorer (seems pretty slow though).

As you posted firefox as well that may not help you.

Do you happen to have any control over the web server, and if so, is it Apache?

If it is Apache you can add a server alias as I have done before for a project. See the snippet code and add something similar to httpd.conf. This will make it so going to "http://<server-name>/data" go to "//company-server/Data/"

You need to have the mod_alias module loaded, so

"LoadModule alias_module modules/mod_alias.so"

Needs to be in the httpd.conf file as well.

Untested with printers, but works with shared drives.
Alias /data/ "//company-server/Data/"

<Directory "//company-server/Data/">

    Options Indexes MultiViews

    AllowOverride None

    Order allow,deny

    Allow from all

</Directory>

Open in new window

0
 

Author Comment

by:mick_rouse
ID: 21812296
Unfortunately it's actually hosted on a customers server, so the addition of any other modules is unfortunately out of the question :(
0
 
LVL 54

Accepted Solution

by:
b0lsc0tt earned 125 total points
ID: 21836195
If the web page is an Internet page then you won't be able to do this.  Almost all current browsers and versions will prevent this type of access to the client machine.  At the very least you will get a security warning but most times you won't even be asked.

Of course if the page is just an intranet or local page then you might be able to do this.  An HTA page is a good option if you want something IE specific. :)

bol
0
 

Author Closing Comment

by:mick_rouse
ID: 31467960
Thanks for that.

I've decided to go down that route.
0
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 21909110
Your welcome!  I'm glad I could help.

I noticed the B grade.  Did you still have a question or need help with this?  If so let me know and I will be happy to provide what I can.  There really wasn't much to this answer but I thought my comment was pretty complete with why and an alternative.  If a mistake was made when you closed this or you have a question about grading on EE then let me know.  There is some good info on grading at http://www.experts-exchange.com/help.jsp#hi97 if you are interested or haven't seen it.  It is nice to always have a chance to earn the A or at least know why it wasn't. :)

Thanks for the fun question.

bol
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
How to Chain multiple custom filters with AngualrJS 3 35
iframe detection of parent window scale 20 60
Basic JavaScript Question 3 38
Centering Vertically 3 28
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.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

895 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

16 Experts available now in Live!

Get 1:1 Help Now