Click here to Skip to main content
15,071,928 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I am trying to install/map a network printer by clicking a button from my website

<a class="btn btn-default" href=file://printservername\printerhostname>Connect »</a>

This is the code behind my button when i click the button it access's the print server but it doesn't try to connect to the printer.

Any help would be greatly appreciated
[no name] 20-Oct-14 7:14am
Probably because you don't have permission.
Ivan Lubbe 20-Oct-14 7:39am
Could you please elaborate? I am able to access the print server (opens print server and a list of network printers) its just not trying to connect to one of those printers

1 solution

The only option I know of is to navigate to the address of the printer in the network, like:
window.location = 'http://machine_ip/printer_name/'

(It have to be http:// and not file://!)
Ivan Lubbe 20-Oct-14 7:40am
I have tried what you mentioned and its not working. I am trying to re-direct the 'hyperlink' to connect to a network printer on my domain

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900