diff --git a/install_printer.asp b/install_printer.asp index 5cd990b..cb46785 100644 --- a/install_printer.asp +++ b/install_printer.asp @@ -204,16 +204,35 @@ Else Set universalPrinters = Server.CreateObject("Scripting.Dictionary") universalNames = "" - ' Force ALL printers through universal installer (ignore specific installers) + ' HP and Xerox use universal installer, others need specific installers + Dim skippedPrinters + Set skippedPrinters = Server.CreateObject("Scripting.Dictionary") + For Each printerKey In printers.Keys Set printer = printers(printerKey) - universalPrinters.Add printerKey, printer - If universalNames <> "" Then universalNames = universalNames & "," - universalNames = universalNames & printer("standardname") + If printer("vendor") = "HP" Or printer("vendor") = "Xerox" Then + universalPrinters.Add printerKey, printer + If universalNames <> "" Then universalNames = universalNames & "," + universalNames = universalNames & printer("standardname") + ElseIf printer("installpath") <> "" Then + specificInstallers.Add printerKey, printer + Else + skippedPrinters.Add printerKey, printer + End If Next - ' Skip specific installers - all printers use universal installer now - ' Process printers with specific installers first (silent mode) + ' Warn about printers that can't be installed + If skippedPrinters.Count > 0 Then + Response.Write("echo." & vbCrLf) + Response.Write("echo *** WARNING: The following printers require manual installation ***" & vbCrLf) + For Each printerKey In skippedPrinters.Keys + Set printer = skippedPrinters(printerKey) + Response.Write("echo - " & printer("standardname") & " (" & printer("vendor") & ")" & vbCrLf) + Next + Response.Write("echo." & vbCrLf) + End If + + ' Process non-HP/Xerox printers with specific installers (e.g., HID card printers) For Each printerKey In specificInstallers.Keys Set printer = specificInstallers(printerKey)