mwilliamsess
IS-IT--Management
Set WshNetwork = CreateObject("WScript.Network")
WshNetwork.AddWindowsPrinterConnection "\\server\printer"
mkDef = msgbox ("Do you want HPLJ2200 to be your default printer?", 292, "Default Printer Status")
If mkDef = 6 Then
WshNetwork.SetDefaultPrinter
msgbox ("Printer HPLJ2200 Installed As Default Successfully.")
Else
msgbox ("Printer HPLJ2200 Installed Successfully.")
End If
This is a function that adds a printer connection that I have on a web page. When the users click a button it install the printer for them. I want a message box to display saying "Access is denied" if the user trys to install a printer they don't have access to. Any help?
WshNetwork.AddWindowsPrinterConnection "\\server\printer"
mkDef = msgbox ("Do you want HPLJ2200 to be your default printer?", 292, "Default Printer Status")
If mkDef = 6 Then
WshNetwork.SetDefaultPrinter
msgbox ("Printer HPLJ2200 Installed As Default Successfully.")
Else
msgbox ("Printer HPLJ2200 Installed Successfully.")
End If
This is a function that adds a printer connection that I have on a web page. When the users click a button it install the printer for them. I want a message box to display saying "Access is denied" if the user trys to install a printer they don't have access to. Any help?