Solved

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

Posted on 2008-06-17
5
1,075 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
[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
  • 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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

732 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