I am trying to use a web page on our local intranet running on IIS server to add printers
the following is the vbs
Function addPrint(pname)
Set WshNetwork = CreateObject(“WScript.Network”)
WshNetwork.AddWindowsPrinterConnection pname
mkDef = msgbox (“Do you want ” & pname & ” to be your default printer?”, 292, “Default Printer Status”)
If mkDef = 6 Then
WshNetwork.SetDefaultPrinter pname
msgbox (“Printer ” & pname & ” Installed As Default Successfully.” & vbcrlf & ” After Adding Your Remaining Printers,Please Reboot.”)
Else
msgbox (“Printer ” & pname & ” Installed Successfully.” & vbcrlf & ” After Adding Your Remaining Printers,Please Reboot.”)
End If
End Function
yet when i run it from the iss server i get line 30, Activex cannot create object “wscript.network”
if i run this locally from the local drive just as a html it works fine
Any ideas?
I appreciate your help