Hello,
I have this code to set my network printer as my default printer when the user clicks on printer icon (a html button). This code works fine when i run the code locally using visual studio. After hosting the same code in IIS, in IE its not setting my network printer as default printer.
<html xmlns="http://www.w3.org/1999/xhtml"><head id="Head1" runat="server"><title></title><script type="text/vbscript"> On Error Resume Next Function AddPrinter On Error Resume Next Dim WshNetwork set WshNetwork =CreateObject("WScript.Network") WshNetwork.AddWindowsPrinterConnection "\\printserver\printername" WshNetwork.SetDefaultPrinter "\\printserver\printername" End Function</script></head><body><form id="form1" runat="server"><div><button onclick="AddPrinter()"> Add Printer</button></div></form></body></html>
Please help on this!!!!
Regards,
Prasanna