'---------------------------------------------------------------------- ' ' Copyright (c) Microsoft Corporation. All rights reserved. ' ' Abstract: ' prnmngr.vbs - printer script for WMI on Windows ' used to add, delete, and list printers and connections ' also for getting and setting the default printer ' ' Usage: ' prnmngr [-adxgtl?][co] [-s server][-p printer][-m driver model][-r port] ' [-u user name][-w password] ' ' Examples: ' prnmngr -a -p "printer" -m "driver" -r "lpt1:" ' prnmngr -d -p "printer" -s server ' prnmngr -ac -p "\\server\printer" ' prnmngr -d -p "\\server\printer" ' prnmngr -x -s server ' prnmngr -l -s server ' prnmngr -g ' prnmngr -t -p "printer" ' '---------------------------------------------------------------------- option explicit ' ' Debugging trace flags, to enable debug output trace message ' change gDebugFlag to true. ' const kDebugTrace = 1 const kDebugError = 2 dim gDebugFlag gDebugFlag = false ' ' Operation action values. ' const kActionUnknown = 0 const kActionAdd = 1 const kActionAddConn = 2 const kActionDel = 3 const kActionDelAll = 4 const kActionDelAllCon = 5 const kActionDelAllLocal = 6 const kActionList = 7 const kActionGetDefaultPrinter = 8 const kActionSetDefaultPrinter = 9 const kErrorSuccess = 0 const KErrorFailure = 1 const kFlagCreateOnly = 2 const kNameSpace = "root\cimv2" ' ' Generic strings ' const L_Empty_Text = "" const L_Space_Text = " " const L_Error_Text = "Error" const L_Success_Text = "Success" const L_Failed_Text = "Failed" const L_Hex_Text = "0x" const L_Printer_Text = "Printer" const L_Operation_Text = "Operation" const L_Provider_Text = "Provider" const L_Description_Text = "Description" const L_Debug_Text = "Debug:" const L_Connection_Text = "connection" ' ' General usage messages ' const L_Help_Help_General01_Text = "Usage: prnmngr [-adxgtl?][c] [-s server][-p printer][-m driver model]" const L_Help_Help_General02_Text = " [-r port][-u user name][-w password]" const L_Help_Help_General03_Text = "Arguments:" const L_Help_Help_General04_Text = "-a - add local printer" const L_Help_Help_General05_Text = "-ac - add printer connection" const L_Help_Help_General06_Text = "-d - delete printer" const L_Help_Help_General07_Text = "-g - get the default printer" const L_Help_Help_General08_Text = "-l - list printers" const L_Help_Help_General09_Text = "-m - driver model" const L_Help_Help_General10_Text = "-p - printer name" const L_Help_Help_General11_Text = "-r - port name" const L_Help_Help_General12_Text = "-s - server name" const L_Help_Help_General13_Text = "-t - set the default printer" const L_Help_Help_General14_Text = "-u - user name" const L_Help_Help_General15_Text = "-w - password" const L_Help_Help_General16_Text = "-x - delete all printers" const L_Help_Help_General17_Text = "-xc - delete all printer connections" const L_Help_Help_General18_Text = "-xo - delete all local printers" const L_Help_Help_General19_Text = "-? - display command usage" const L_Help_Help_General20_Text = "Examples:" const L_Help_Help_General21_Text = "prnmngr -a -p ""printer"" -m ""driver"" -r ""lpt1:""" const L_Help_Help_General22_Text = "prnmngr -d -p ""printer"" -s server" const L_Help_Help_General23_Text = "prnmngr -ac -p ""\\server\printer""" const L_Help_Help_General24_Text = "prnmngr -d -p ""\\server\printer""" const L_Help_Help_General25_Text = "prnmngr -x -s server" const L_Help_Help_General26_Text = "prnmngr -xo" const L_Help_Help_General27_Text = "prnmngr -l -s server" const L_Help_Help_General28_Text = "prnmngr -g" const L_Help_Help_General29_Text = "prnmngr -t -p ""\\server\printer""" ' ' Messages to be displayed if the scripting host is not cscript ' const L_Help_Help_Host01_Text = "This script should be executed from the Command Prompt using CScript.exe." const L_Help_Help_Host02_Text = "For example: CScript script.vbs arguments" const L_Help_Help_Host03_Text = "" const L_Help_Help_Host04_Text = "To set CScript as the default application to run .VBS files run the following:" const L_Help_Help_Host05_Text = " CScript //H:CScript //S" const L_Help_Help_Host06_Text = "You can then run ""script.vbs arguments"" without preceding the script with CScript." ' ' General error messages ' const L_Text_Error_General01_Text = "The scripting host could not be determined." const L_Text_Error_General02_Text = "Unable to parse command line." const L_Text_Error_General03_Text = "Win32 error code" ' ' Miscellaneous messages ' const L_Text_Msg_General01_Text = "Added printer" const L_Text_Msg_General02_Text = "Unable to add printer" const L_Text_Msg_General03_Text = "Added printer connection" const L_Text_Msg_General04_Text = "Unable to add printer connection" const L_Text_Msg_General05_Text = "Deleted printer" const L_Text_Msg_General06_Text = "Unable to delete printer" const L_Text_Msg_General07_Text = "Attempting to delete printer" const L_Text_Msg_General08_Text = "Unable to delete printers" const L_Text_Msg_General09_Text = "Number of local printers and connections enumerated" const L_Text_Msg_General10_Text = "Number of local printers and connections deleted" const L_Text_Msg_General11_Text = "Unable to enumerate printers" const L_Text_Msg_General12_Text = "The default printer is" const L_Text_Msg_General13_Text = "Unable to get the default printer" const L_Text_Msg_General14_Text = "Unable to set the default printer" const L_Text_Msg_General15_Text = "The default printer is now" const L_Text_Msg_General16_Text = "Number of printer connections enumerated" const L_Text_Msg_General17_Text = "Number of printer connections deleted" const L_Text_Msg_General18_Text = "Number of local printers enumerated" const L_Text_Msg_General19_Text = "Number of local printers deleted" ' ' Printer properties ' const L_Text_Msg_Printer01_Text = "Server name" const L_Text_Msg_Printer02_Text = "Printer name" const L_Text_Msg_Printer03_Text = "Share name" const L_Text_Msg_Printer04_Text = "Driver name" const L_Text_Msg_Printer05_Text = "Port name" const L_Text_Msg_Printer06_Text = "Comment" const L_Text_Msg_Printer07_Text = "Location" const L_Text_Msg_Printer08_Text = "Separator file" const L_Text_Msg_Printer09_Text = "Print processor" const L_Text_Msg_Printer10_Text = "Data type" const L_Text_Msg_Printer11_Text = "Parameters" const L_Text_Msg_Printer12_Text = "Attributes" const L_Text_Msg_Printer13_Text = "Priority" const L_Text_Msg_Printer14_Text = "Default priority" const L_Text_Msg_Printer15_Text = "Start time" const L_Text_Msg_Printer16_Text = "Until time" const L_Text_Msg_Printer17_Text = "Job count" const L_Text_Msg_Printer18_Text = "Average pages per minute" const L_Text_Msg_Printer19_Text = "Printer status" const L_Text_Msg_Printer20_Text = "Extended printer status" const L_Text_Msg_Printer21_Text = "Detected error state" const L_Text_Msg_Printer22_Text = "Extended detected error state" ' ' Printer status ' const L_Text_Msg_Status01_Text = "Other" const L_Text_Msg_Status02_Text = "Unknown" const L_Text_Msg_Status03_Text = "Idle" const L_Text_Msg_Status04_Text = "Printing" const L_Text_Msg_Status05_Text = "Warmup" const L_Text_Msg_Status06_Text = "Stopped printing" const L_Text_Msg_Status07_Text = "Offline" const L_Text_Msg_Status08_Text = "Paused" const L_Text_Msg_Status09_Text = "Error" const L_Text_Msg_Status10_Text = "Busy" const L_Text_Msg_Status11_Text = "Not available" const L_Text_Msg_Status12_Text = "Waiting" const L_Text_Msg_Status13_Text = "Processing" const L_Text_Msg_Status14_Text = "Initializing" const L_Text_Msg_Status15_Text = "Power save" const L_Text_Msg_Status16_Text = "Pending deletion" const L_Text_Msg_Status17_Text = "I/O active" const L_Text_Msg_Status18_Text = "Manual feed" const L_Text_Msg_Status19_Text = "No error" const L_Text_Msg_Status20_Text = "Low paper" const L_Text_Msg_Status21_Text = "No paper" const L_Text_Msg_Status22_Text = "Low toner" const L_Text_Msg_Status23_Text = "No toner" const L_Text_Msg_Status24_Text = "Door open" const L_Text_Msg_Status25_Text = "Jammed" const L_Text_Msg_Status26_Text = "Service requested" const L_Text_Msg_Status27_Text = "Output bin full" const L_Text_Msg_Status28_Text = "Paper problem" const L_Text_Msg_Status29_Text = "Cannot print page" const L_Text_Msg_Status30_Text = "User intervention required" const L_Text_Msg_Status31_Text = "Out of memory" const L_Text_Msg_Status32_Text = "Server unknown" ' ' Debug messages ' const L_Text_Dbg_Msg01_Text = "In function AddPrinter" const L_Text_Dbg_Msg02_Text = "In function AddPrinterConnection" const L_Text_Dbg_Msg03_Text = "In function DelPrinter" const L_Text_Dbg_Msg04_Text = "In function DelAllPrinters" const L_Text_Dbg_Msg05_Text = "In function ListPrinters" const L_Text_Dbg_Msg06_Text = "In function GetDefaultPrinter" const L_Text_Dbg_Msg07_Text = "In function SetDefaultPrinter" const L_Text_Dbg_Msg08_Text = "In function ParseCommandLine" main ' ' Main execution starts here ' sub main dim iAction dim iRetval dim strServer dim strPrinter dim strDriver dim strPort dim strUser dim strPassword ' ' Abort if the host is not cscript ' if not IsHostCscript() then call wscript.echo(L_Help_Help_Host01_Text & vbCRLF & L_Help_Help_Host02_Text & vbCRLF & _ L_Help_Help_Host03_Text & vbCRLF & L_Help_Help_Host04_Text & vbCRLF & _ L_Help_Help_Host05_Text & vbCRLF & L_Help_Help_Host06_Text & vbCRLF) wscript.quit end if ' ' Get command line parameters ' iRetval = ParseCommandLine(iAction, strServer, strPrinter, strDriver, strPort, strUser, strPassword) if iRetval = kErrorSuccess then select case iAction case kActionAdd iRetval = AddPrinter(strServer, strPrinter, strDriver, strPort, strUser, strPassword) case kActionAddConn iRetval = AddPrinterConnection(strPrinter, strUser, strPassword) case kActionDel iRetval = DelPrinter(strServer, strPrinter, strUser, strPassword) case kActionDelAll iRetval = DelAllPrinters(kActionDelAll, strServer, strUser, strPassword) case kActionDelAllCon iRetval = DelAllPrinters(kActionDelAllCon, strServer, strUser, strPassword) case kActionDelAllLocal iRetval = DelAllPrinters(kActionDelAllLocal, strServer, strUser, strPassword) case kActionList iRetval = ListPrinters(strServer, strUser, strPassword) case kActionGetDefaultPrinter iRetval = GetDefaultPrinter(strUser, strPassword) case kActionSetDefaultPrinter iRetval = SetDefaultPrinter(strPrinter, strUser, strPassword) case kActionUnknown Usage(true) exit sub case else Usage(true) exit sub end select end if end sub ' ' Add a printer with minimum settings. Use prncnfg.vbs to ' set the complete configuration of a printer ' function AddPrinter(strServer, strPrinter, strDriver, strPort, strUser, strPassword) on error resume next DebugPrint kDebugTrace, L_Text_Dbg_Msg01_Text DebugPrint kDebugTrace, L_Text_Msg_Printer01_Text & L_Space_Text & strServer DebugPrint kDebugTrace, L_Text_Msg_Printer02_Text & L_Space_Text & strPrinter DebugPrint kDebugTrace, L_Text_Msg_Printer04_Text & L_Space_Text & strDriver DebugPrint kDebugTrace, L_Text_Msg_Printer05_Text & L_Space_Text & strPort dim oPrinter dim oService dim iRetval if WmiConnect(strServer, kNameSpace, strUser, strPassword, oService) then set oPrinter = oService.Get("Win32_Printer").SpawnInstance_ else AddPrinter = kErrorFailure exit function end if oPrinter.DriverName = strDriver oPrinter.PortName = strPort oPrinter.DeviceID = strPrinter oPrinter.Put_(kFlagCreateOnly) if Err.Number = kErrorSuccess then wscript.echo L_Text_Msg_General01_Text & L_Space_Text & strPrinter iRetval = kErrorSuccess else wscript.echo L_Text_Msg_General02_Text & L_Space_Text & strPrinter & L_Space_Text & L_Error_Text _ & L_Space_Text & L_Hex_Text & hex(Err.Number) & L_Space_Text & Err.Description ' ' Try getting extended error information ' call LastError() iRetval = kErrorFailure end if AddPrinter = iRetval end function ' ' Add a printer connection ' function AddPrinterConnection(strPrinter, strUser, strPassword) on error resume next DebugPrint kDebugTrace, L_Text_Dbg_Msg02_Text dim oPrinter dim oService dim iRetval dim uResult ' ' Initialize return value ' iRetval = kErrorFailure ' ' We connect to the local server ' if WmiConnect("", kNameSpace, strUser, strPassword, oService) then set oPrinter = oService.Get("Win32_Printer") else AddPrinterConnection = kErrorFailure exit function end if ' ' Check if Get was successful ' if Err.Number = kErrorSuccess then ' ' The Err object indicates whether the WMI provider reached the execution ' of the function that adds a printer connection. The uResult is the Win32 ' error code returned by the static method that adds a printer connection ' uResult = oPrinter.AddPrinterConnection(strPrinter) if Err.Number = kErrorSuccess then if uResult = kErrorSuccess then wscript.echo L_Text_Msg_General03_Text & L_Space_Text & strPrinter iRetval = kErrorSuccess else wscript.echo L_Text_Msg_General04_Text & L_Space_Text & L_Text_Error_General03_Text _ & L_Space_text & uResult end if else wscript.echo L_Text_Msg_General04_Text & L_Space_Text & strPrinter & L_Space_Text _ & L_Error_Text & L_Space_Text & L_Hex_Text & hex(Err.Number) & L_Space_Text _ & Err.Description end if else wscript.echo L_Text_Msg_General04_Text & L_Space_Text & strPrinter & L_Space_Text _ & L_Error_Text & L_Space_Text & L_Hex_Text & hex(Err.Number) & L_Space_Text _ & Err.Description end if AddPrinterConnection = iRetval end function ' ' Delete a printer or a printer connection ' function DelPrinter(strServer, strPrinter, strUser, strPassword) on error resume next DebugPrint kDebugTrace, L_Text_Dbg_Msg03_Text DebugPrint kDebugTrace, L_Text_Msg_Printer01_Text & L_Space_Text & strServer DebugPrint kDebugTrace, L_Text_Msg_Printer02_Text & L_Space_Text & strPrinter dim oService dim oPrinter dim iRetval iRetval = kErrorFailure if WmiConnect(strServer, kNameSpace, strUser, strPassword, oService) then set oPrinter = oService.Get("Win32_Printer.DeviceID='" & strPrinter & "'") else DelPrinter = kErrorFailure exit function end if ' ' Check if Get was successful ' if Err.Number = kErrorSuccess then oPrinter.Delete_ if Err.Number = kErrorSuccess then wscript.echo L_Text_Msg_General05_Text & L_Space_Text & strPrinter iRetval = kErrorSuccess else wscript.echo L_Text_Msg_General06_Text & L_Space_Text & strPrinter & L_Space_Text _ & L_Error_Text & L_Space_Text & L_Hex_Text & hex(Err.Number) _ & L_Space_Text & Err.Description ' ' Try getting extended error information ' call LastError() end if else wscript.echo L_Text_Msg_General06_Text & L_Space_Text & strPrinter & L_Space_Text _ & L_Error_Text & L_Space_Text & L_Hex_Text & hex(Err.Number) _ & L_Space_Text & Err.Description ' ' Try getting extended error information ' call LastError() end if DelPrinter = iRetval end function ' ' Delete all local printers and connections on a machine ' function DelAllPrinters(kAction, strServer, strUser, strPassword) on error resume next DebugPrint kDebugTrace, L_Text_Dbg_Msg04_Text dim Printers dim oPrinter dim oService dim iResult dim iTotal dim iTotalDeleted dim strPrinterName dim bDelete dim bConnection dim strTemp if WmiConnect(strServer, kNameSpace, strUser, strPassword, oService) then set Printers = oService.InstancesOf("Win32_Printer") else DelAllPrinters = kErrorFailure exit function end if if Err.Number <> kErrorSuccess then wscript.echo L_Text_Msg_General11_Text & L_Space_Text & L_Error_Text & L_Space_Text _ & L_Hex_Text & hex(Err.Number) & L_Space_Text & Err.Description DelAllPrinters = kErrorFailure exit function end if iTotal = 0 iTotalDeleted = 0 for each oPrinter in Printers strPrinterName = oPrinter.DeviceID bConnection = oPrinter.Network if kAction = kActionDelAll then bDelete = 1 iTotal = iTotal + 1 elseif kAction = kActionDelAllCon and bConnection then bDelete = 1 iTotal = iTotal + 1 elseif kAction = kActionDelAllLocal and not bConnection then bDelete = 1 iTotal = iTotal + 1 else bDelete = 0 end if if bDelete = 1 then if bConnection then strTemp = L_Space_Text & L_Connection_Text & L_Space_Text else strTemp = L_Space_Text end if ' ' Delete printer instance ' oPrinter.Delete_ if Err.Number = kErrorSuccess then wscript.echo L_Text_Msg_General05_Text & strTemp & oPrinter.DeviceID iTotalDeleted = iTotalDeleted + 1 else wscript.echo L_Text_Msg_General06_Text & strTemp & strPrinterName _ & L_Space_Text & L_Error_Text & L_Space_Text & L_Hex_Text _ & hex(Err.Number) & L_Space_Text & Err.Description ' ' Try getting extended error information ' call LastError() ' ' Continue deleting the rest of the printers despite this error ' Err.Clear end if end if next wscript.echo L_Empty_Text if kAction = kActionDelAll then wscript.echo L_Text_Msg_General09_Text & L_Space_Text & iTotal wscript.echo L_Text_Msg_General10_Text & L_Space_Text & iTotalDeleted elseif kAction = kActionDelAllCon then wscript.echo L_Text_Msg_General16_Text & L_Space_Text & iTotal wscript.echo L_Text_Msg_General17_Text & L_Space_Text & iTotalDeleted elseif kAction = kActionDelAllLocal then wscript.echo L_Text_Msg_General18_Text & L_Space_Text & iTotal wscript.echo L_Text_Msg_General19_Text & L_Space_Text & iTotalDeleted else end if DelAllPrinters = kErrorSuccess end function ' ' List the printers ' function ListPrinters(strServer, strUser, strPassword) on error resume next DebugPrint kDebugTrace, L_Text_Dbg_Msg05_Text dim Printers dim oService dim oPrinter dim iTotal if WmiConnect(strServer, kNameSpace, strUser, strPassword, oService) then set Printers = oService.InstancesOf("Win32_Printer") else ListPrinters = kErrorFailure exit function end if if Err.Number <> kErrorSuccess then wscript.echo L_Text_Msg_General11_Text & L_Space_Text & L_Error_Text & L_Space_Text _ & L_Hex_Text & hex(Err.Number) & L_Space_Text & Err.Description ListPrinters = kErrorFailure exit function end if iTotal = 0 for each oPrinter in Printers iTotal = iTotal + 1 wscript.echo L_Empty_Text wscript.echo L_Text_Msg_Printer01_Text & L_Space_Text & strServer wscript.echo L_Text_Msg_Printer02_Text & L_Space_Text & oPrinter.DeviceID wscript.echo L_Text_Msg_Printer03_Text & L_Space_Text & oPrinter.ShareName wscript.echo L_Text_Msg_Printer04_Text & L_Space_Text & oPrinter.DriverName wscript.echo L_Text_Msg_Printer05_Text & L_Space_Text & oPrinter.PortName wscript.echo L_Text_Msg_Printer06_Text & L_Space_Text & oPrinter.Comment wscript.echo L_Text_Msg_Printer07_Text & L_Space_Text & oPrinter.Location wscript.echo L_Text_Msg_Printer08_Text & L_Space_Text & oPrinter.SepFile wscript.echo L_Text_Msg_Printer09_Text & L_Space_Text & oPrinter.PrintProcessor wscript.echo L_Text_Msg_Printer10_Text & L_Space_Text & oPrinter.PrintJobDataType wscript.echo L_Text_Msg_Printer11_Text & L_Space_Text & oPrinter.Parameters wscript.echo L_Text_Msg_Printer12_Text & L_Space_Text & CSTR(oPrinter.Attributes) wscript.echo L_Text_Msg_Printer13_Text & L_Space_Text & CSTR(oPrinter.Priority) wscript.echo L_Text_Msg_Printer14_Text & L_Space_Text & CStr(oPrinter.DefaultPriority) if CStr(oPrinter.StartTime) <> "" and CStr(oPrinter.UntilTime) <> "" then wscript.echo L_Text_Msg_Printer15_Text & L_Space_Text & Mid(Mid(CStr(oPrinter.StartTime), 9, 4), 1, 2) & "h" & Mid(Mid(CStr(oPrinter.StartTime), 9, 4), 3, 2) wscript.echo L_Text_Msg_Printer16_Text & L_Space_Text & Mid(Mid(CStr(oPrinter.UntilTime), 9, 4), 1, 2) & "h" & Mid(Mid(CStr(oPrinter.UntilTime), 9, 4), 3, 2) end if wscript.echo L_Text_Msg_Printer17_Text & L_Space_Text & CStr(oPrinter.Jobs) wscript.echo L_Text_Msg_Printer18_Text & L_Space_Text & CStr(oPrinter.AveragePagesPerMinute) wscript.echo L_Text_Msg_Printer19_Text & L_Space_Text & PrnStatusToString(oPrinter.PrinterStatus) wscript.echo L_Text_Msg_Printer20_Text & L_Space_Text & ExtPrnStatusToString(oPrinter.ExtendedPrinterStatus) wscript.echo L_Text_Msg_Printer21_Text & L_Space_Text & DetectedErrorStateToString(oPrinter.DetectedErrorState) wscript.echo L_Text_Msg_Printer22_Text & L_Space_Text & ExtDetectedErrorStateToString(oPrinter.ExtendedDetectedErrorState) Err.Clear next wscript.echo L_Empty_Text wscript.echo L_Text_Msg_General09_Text & L_Space_Text & iTotal ListPrinters = kErrorSuccess end function ' ' Get the default printer ' function GetDefaultPrinter(strUser, strPassword) on error resume next DebugPrint kDebugTrace, L_Text_Dbg_Msg06_Text dim oService dim oPrinter dim iRetval dim oEnum iRetval = kErrorFailure ' ' We connect to the local server ' if WmiConnect("", kNameSpace, strUser, strPassword, oService) then set oEnum = oService.ExecQuery("select DeviceID from Win32_Printer where default=true") else SetDefaultPrinter = kErrorFailure exit function end if if Err.Number = kErrorSuccess then for each oPrinter in oEnum wscript.echo L_Text_Msg_General12_Text & L_Space_Text & oPrinter.DeviceID next iRetval = kErrorSuccess else wscript.echo L_Text_Msg_General13_Text & L_Space_Text & L_Error_Text & L_Space_Text _ & L_Hex_Text & hex(Err.Number) & L_Space_Text & Err.Description end if GetDefaultPrinter = iRetval end function ' ' Set the default printer ' function SetDefaultPrinter(strPrinter, strUser, strPassword) 'on error resume next DebugPrint kDebugTrace, L_Text_Dbg_Msg07_Text dim oService dim oPrinter dim iRetval dim uResult iRetval = kErrorFailure ' ' We connect to the local server ' if WmiConnect("", kNameSpace, strUser, strPassword, oService) then set oPrinter = oService.Get("Win32_Printer.DeviceID='" & strPrinter & "'") else SetDefaultPrinter = kErrorFailure exit function end if ' ' Check if Get was successful ' if Err.Number = kErrorSuccess then ' ' The Err object indicates whether the WMI provider reached the execution ' of the function that sets the default printer. The uResult is the Win32 ' error code of the spooler function that sets the default printer ' uResult = oPrinter.SetDefaultPrinter if Err.Number = kErrorSuccess then if uResult = kErrorSuccess then wscript.echo L_Text_Msg_General15_Text & L_Space_Text & strPrinter iRetval = kErrorSuccess else wscript.echo L_Text_Msg_General14_Text & L_Space_Text _ & L_Text_Error_General03_Text& L_Space_Text & uResult end if else wscript.echo L_Text_Msg_General14_Text & L_Space_Text & L_Error_Text & L_Space_Text _ & L_Hex_Text & hex(Err.Number) & L_Space_Text & Err.Description end if else wscript.echo L_Text_Msg_General14_Text & L_Space_Text & L_Error_Text & L_Space_Text _ & L_Hex_Text & hex(Err.Number) & L_Space_Text & Err.Description ' ' Try getting extended error information ' call LastError() end if SetDefaultPrinter = iRetval end function ' ' Converts the printer status to a string ' function PrnStatusToString(Status) dim str str = L_Empty_Text select case Status case 1 str = str + L_Text_Msg_Status01_Text + L_Space_Text case 2 str = str + L_Text_Msg_Status02_Text + L_Space_Text case 3 str = str + L_Text_Msg_Status03_Text + L_Space_Text case 4 str = str + L_Text_Msg_Status04_Text + L_Space_Text case 5 str = str + L_Text_Msg_Status05_Text + L_Space_Text case 6 str = str + L_Text_Msg_Status06_Text + L_Space_Text case 7 str = str + L_Text_Msg_Status07_Text + L_Space_Text end select PrnStatusToString = str end function ' ' Converts the extended printer status to a string ' function ExtPrnStatusToString(Status) dim str str = L_Empty_Text select case Status case 1 str = str + L_Text_Msg_Status01_Text + L_Space_Text case 2 str = str + L_Text_Msg_Status02_Text + L_Space_Text case 3 str = str + L_Text_Msg_Status03_Text + L_Space_Text case 4 str = str + L_Text_Msg_Status04_Text + L_Space_Text case 5 str = str + L_Text_Msg_Status05_Text + L_Space_Text case 6 str = str + L_Text_Msg_Status06_Text + L_Space_Text case 7 str = str + L_Text_Msg_Status07_Text + L_Space_Text case 8 str = str + L_Text_Msg_Status08_Text + L_Space_Text case 9 str = str + L_Text_Msg_Status09_Text + L_Space_Text case 10 str = str + L_Text_Msg_Status10_Text + L_Space_Text case 11 str = str + L_Text_Msg_Status11_Text + L_Space_Text case 12 str = str + L_Text_Msg_Status12_Text + L_Space_Text case 13 str = str + L_Text_Msg_Status13_Text + L_Space_Text case 14 str = str + L_Text_Msg_Status14_Text + L_Space_Text case 15 str = str + L_Text_Msg_Status15_Text + L_Space_Text case 16 str = str + L_Text_Msg_Status16_Text + L_Space_Text case 17 str = str + L_Text_Msg_Status17_Text + L_Space_Text case 18 str = str + L_Text_Msg_Status18_Text + L_Space_Text end select ExtPrnStatusToString = str end function ' ' Converts the detected error state to a string ' function DetectedErrorStateToString(Status) dim str str = L_Empty_Text select case Status case 0 str = str + L_Text_Msg_Status02_Text + L_Space_Text case 1 str = str + L_Text_Msg_Status01_Text + L_Space_Text case 2 str = str + L_Text_Msg_Status01_Text + L_Space_Text case 3 str = str + L_Text_Msg_Status20_Text + L_Space_Text case 4 str = str + L_Text_Msg_Status21_Text + L_Space_Text case 5 str = str + L_Text_Msg_Status22_Text + L_Space_Text case 6 str = str + L_Text_Msg_Status23_Text + L_Space_Text case 7 str = str + L_Text_Msg_Status24_Text + L_Space_Text case 8 str = str + L_Text_Msg_Status25_Text + L_Space_Text case 9 str = str + L_Text_Msg_Status07_Text + L_Space_Text case 10 str = str + L_Text_Msg_Status26_Text + L_Space_Text case 11 str = str + L_Text_Msg_Status27_Text + L_Space_Text end select DetectedErrorStateToString = str end function ' ' Converts the extended detected error state to a string ' function ExtDetectedErrorStateToString(Status) dim str str = L_Empty_Text select case Status case 0 str = str + L_Text_Msg_Status02_Text + L_Space_Text case 1 str = str + L_Text_Msg_Status01_Text + L_Space_Text case 2 str = str + L_Text_Msg_Status01_Text + L_Space_Text case 3 str = str + L_Text_Msg_Status20_Text + L_Space_Text case 4 str = str + L_Text_Msg_Status21_Text + L_Space_Text case 5 str = str + L_Text_Msg_Status22_Text + L_Space_Text case 6 str = str + L_Text_Msg_Status23_Text + L_Space_Text case 7 str = str + L_Text_Msg_Status24_Text + L_Space_Text case 8 str = str + L_Text_Msg_Status25_Text + L_Space_Text case 9 str = str + L_Text_Msg_Status07_Text + L_Space_Text case 10 str = str + L_Text_Msg_Status26_Text + L_Space_Text case 11 str = str + L_Text_Msg_Status27_Text + L_Space_Text case 12 str = str + L_Text_Msg_Status28_Text + L_Space_Text case 13 str = str + L_Text_Msg_Status29_Text + L_Space_Text case 14 str = str + L_Text_Msg_Status30_Text + L_Space_Text case 15 str = str + L_Text_Msg_Status31_Text + L_Space_Text case 16 str = str + L_Text_Msg_Status32_Text + L_Space_Text end select ExtDetectedErrorStateToString = str end function ' ' Debug display helper function ' sub DebugPrint(uFlags, strString) if gDebugFlag = true then if uFlags = kDebugTrace then wscript.echo L_Debug_Text & L_Space_Text & strString end if if uFlags = kDebugError then if Err <> 0 then wscript.echo L_Debug_Text & L_Space_Text & strString & L_Space_Text _ & L_Error_Text & L_Space_Text & L_Hex_Text & hex(Err.Number) _ & L_Space_Text & Err.Description end if end if end if end sub ' ' Parse the command line into its components ' function ParseCommandLine(iAction, strServer, strPrinter, strDriver, strPort, strUser, strPassword) on error resume next DebugPrint kDebugTrace, L_Text_Dbg_Msg08_Text dim oArgs dim iIndex iAction = kActionUnknown iIndex = 0 set oArgs = wscript.Arguments while iIndex < oArgs.Count select case oArgs(iIndex) case "-a" iAction = kActionAdd case "-ac" iAction = kActionAddConn case "-d" iAction = kActionDel case "-x" iAction = kActionDelAll case "-xc" iAction = kActionDelAllCon case "-xo" iAction = kActionDelAllLocal case "-l" iAction = kActionList case "-g" iAction = kActionGetDefaultPrinter case "-t" iAction = kActionSetDefaultPrinter case "-s" iIndex = iIndex + 1 strServer = RemoveBackslashes(oArgs(iIndex)) case "-p" iIndex = iIndex + 1 strPrinter = oArgs(iIndex) case "-m" iIndex = iIndex + 1 strDriver = oArgs(iIndex) case "-u" iIndex = iIndex + 1 strUser = oArgs(iIndex) case "-w" iIndex = iIndex + 1 strPassword = oArgs(iIndex) case "-r" iIndex = iIndex + 1 strPort = oArgs(iIndex) case "-?" Usage(true) exit function case else Usage(true) exit function end select iIndex = iIndex + 1 wend if Err = kErrorSuccess then ParseCommandLine = kErrorSuccess else wscript.echo L_Text_Error_General02_Text & L_Space_Text & L_Error_Text & L_Space_Text _ & L_Hex_Text & hex(Err.Number) & L_Space_text & Err.Description ParseCommandLine = kErrorFailure end if end function ' ' Display command usage. ' sub Usage(bExit) wscript.echo L_Help_Help_General01_Text wscript.echo L_Help_Help_General02_Text wscript.echo L_Help_Help_General03_Text wscript.echo L_Help_Help_General04_Text wscript.echo L_Help_Help_General05_Text wscript.echo L_Help_Help_General06_Text wscript.echo L_Help_Help_General07_Text wscript.echo L_Help_Help_General08_Text wscript.echo L_Help_Help_General09_Text wscript.echo L_Help_Help_General10_Text wscript.echo L_Help_Help_General11_Text wscript.echo L_Help_Help_General12_Text wscript.echo L_Help_Help_General13_Text wscript.echo L_Help_Help_General14_Text wscript.echo L_Help_Help_General15_Text wscript.echo L_Help_Help_General16_Text wscript.echo L_Help_Help_General17_Text wscript.echo L_Help_Help_General18_Text wscript.echo L_Help_Help_General19_Text wscript.echo L_Empty_Text wscript.echo L_Help_Help_General20_Text wscript.echo L_Help_Help_General21_Text wscript.echo L_Help_Help_General22_Text wscript.echo L_Help_Help_General23_Text wscript.echo L_Help_Help_General24_Text wscript.echo L_Help_Help_General25_Text wscript.echo L_Help_Help_General26_Text wscript.echo L_Help_Help_General27_Text wscript.echo L_Help_Help_General28_Text wscript.echo L_Help_Help_General29_Text if bExit then wscript.quit(1) end if end sub ' ' Determines which program is being used to run this script. ' Returns true if the script host is cscript.exe ' function IsHostCscript() on error resume next dim strFullName dim strCommand dim i, j dim bReturn bReturn = false strFullName = WScript.FullName i = InStr(1, strFullName, ".exe", 1) if i <> 0 then j = InStrRev(strFullName, "\", i, 1) if j <> 0 then strCommand = Mid(strFullName, j+1, i-j-1) if LCase(strCommand) = "cscript" then bReturn = true end if end if end if if Err <> 0 then wscript.echo L_Text_Error_General01_Text & L_Space_Text & L_Error_Text & L_Space_Text _ & L_Hex_Text & hex(Err.Number) & L_Space_Text & Err.Description end if IsHostCscript = bReturn end function ' ' Retrieves extended information about the last error that occurred ' during a WBEM operation. The methods that set an SWbemLastError ' object are GetObject, PutInstance, DeleteInstance ' sub LastError() on error resume next dim oError set oError = CreateObject("WbemScripting.SWbemLastError") if Err = kErrorSuccess then wscript.echo L_Operation_Text & L_Space_Text & oError.Operation wscript.echo L_Provider_Text & L_Space_Text & oError.ProviderName wscript.echo L_Description_Text & L_Space_Text & oError.Description wscript.echo L_Text_Error_General03_Text & L_Space_Text & oError.StatusCode end if end sub ' ' Connects to the WMI service on a server. oService is returned as a service ' object (SWbemServices) ' function WmiConnect(strServer, strNameSpace, strUser, strPassword, oService) on error resume next dim oLocator dim bResult oService = null bResult = false set oLocator = CreateObject("WbemScripting.SWbemLocator") if Err = kErrorSuccess then set oService = oLocator.ConnectServer(strServer, strNameSpace, strUser, strPassword) if Err = kErrorSuccess then bResult = true oService.Security_.impersonationlevel = 3 ' ' Required to perform administrative tasks on the spooler service ' oService.Security_.Privileges.AddAsString "SeLoadDriverPrivilege" Err.Clear else wscript.echo L_Text_Msg_General11_Text & L_Space_Text & L_Error_Text _ & L_Space_Text & L_Hex_Text & hex(Err.Number) & L_Space_Text _ & Err.Description end if else wscript.echo L_Text_Msg_General10_Text & L_Space_Text & L_Error_Text _ & L_Space_Text & L_Hex_Text & hex(Err.Number) & L_Space_Text _ & Err.Description end if WmiConnect = bResult end function ' ' Remove leading "\\" from server name ' function RemoveBackslashes(strServer) dim strRet strRet = strServer if Left(strServer, 2) = "\\" and Len(strServer) > 2 then strRet = Mid(strServer, 3) end if RemoveBackslashes = strRet end function '' SIG '' Begin signature block '' SIG '' MIIl8AYJKoZIhvcNAQcCoIIl4TCCJd0CAQExDzANBglg '' SIG '' hkgBZQMEAgEFADB3BgorBgEEAYI3AgEEoGkwZzAyBgor '' SIG '' BgEEAYI3AgEeMCQCAQEEEE7wKRaZJ7VNj+Ws4Q8X66sC '' SIG '' AQACAQACAQACAQACAQAwMTANBglghkgBZQMEAgEFAAQg '' SIG '' JgK02eO+gRAvE2IMUc2ETsWGPR1isJdKW/vFu8QQ+Hag '' SIG '' ggroMIIFCTCCA/GgAwIBAgITMwAABRhBhBmty60pTwAA '' SIG '' AAAFGDANBgkqhkiG9w0BAQsFADCBhDELMAkGA1UEBhMC '' SIG '' VVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcT '' SIG '' B1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jw '' SIG '' b3JhdGlvbjEuMCwGA1UEAxMlTWljcm9zb2Z0IFdpbmRv '' SIG '' d3MgUHJvZHVjdGlvbiBQQ0EgMjAxMTAeFw0yNTA2MTkx '' SIG '' ODExNDNaFw0yNjA2MTcxODExNDNaMHAxCzAJBgNVBAYT '' SIG '' AlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQH '' SIG '' EwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29y '' SIG '' cG9yYXRpb24xGjAYBgNVBAMTEU1pY3Jvc29mdCBXaW5k '' SIG '' b3dzMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC '' SIG '' AQEA13mqBajcSzGIQ7kqJCIE6oxXJVfqr0iUnSh2fDN9 '' SIG '' r18wuHPIlLeHyatPsH1rArFXUyj1IoPlkAbP8shArkP0 '' SIG '' m3AOlDZv8eH2Dw13ICwabGPn4SgKrY2+HlQtXtv7w+T0 '' SIG '' 5JCnEZHNjYXM05FkxvDOp7XlDH+t7trr7jFwtjjt1GSy '' SIG '' p/e1la0D5bprFgrZd+idRKV3f0InKTtqr3/3QPgm6AGg '' SIG '' csV6djsk1zCxsbCa2mPbSv2Z0iyjPzdInLsOb/mQF7Mu '' SIG '' LaG7KcnrpnI8hgr3ce4G0gZTJGp80n8HjEFdpkdfzRJa '' SIG '' xhGKyeCziaFukwCJxQvRLdfPyfdzDbibuZUy5QIDAQAB '' SIG '' o4IBhTCCAYEwHwYDVR0lBBgwFgYKKwYBBAGCNwoDBgYI '' SIG '' KwYBBQUHAwMwHQYDVR0OBBYEFOF41I/R69R+LhZJ5/DU '' SIG '' oIJ88kCTMFQGA1UdEQRNMEukSTBHMS0wKwYDVQQLEyRN '' SIG '' aWNyb3NvZnQgSXJlbGFuZCBPcGVyYXRpb25zIExpbWl0 '' SIG '' ZWQxFjAUBgNVBAUTDTIyOTg3OSs1MDUzMzYwHwYDVR0j '' SIG '' BBgwFoAUqSkCOY4WxJd4zZD5nk+a4XxVr1MwVwYDVR0f '' SIG '' BFAwTjBMoEqgSIZGaHR0cDovL3d3dy5taWNyb3NvZnQu '' SIG '' Y29tL3BraW9wcy9jcmwvTWljV2luUHJvUENBMjAxMV8y '' SIG '' MDExLTEwLTE5LmNybCUyMDBhBggrBgEFBQcBAQRVMFMw '' SIG '' UQYIKwYBBQUHMAKGRWh0dHA6Ly93d3cubWljcm9zb2Z0 '' SIG '' LmNvbS9wa2lvcHMvY2VydHMvTWljV2luUHJvUENBMjAx '' SIG '' MV8yMDExLTEwLTE5LmNydDAMBgNVHRMBAf8EAjAAMA0G '' SIG '' CSqGSIb3DQEBCwUAA4IBAQA73LToVzb48EsyNktWyWo+ '' SIG '' IGLgB2p9kuAEQkU+8hLq0rA9WZonC9cODucqsbIMr1+h '' SIG '' dczYWea7HVahHNh1e1l/t8UyFkJvbpIlr8SZV+RlV4s+ '' SIG '' WtBJzI6I85EjEBBNDiz26s/HTuK3hb0mOFTzRZLih4OB '' SIG '' npKR4+lid/Ptj6Vpz1LtTxLX7PrwIntLTvTe2HiJPSJ0 '' SIG '' kphhrHebSBArR0IRqtHbz/wcx1MMtBSPgjiKI1id83Hy '' SIG '' j7Y604D5Z/Dak+1qcCo77G1Inkm39qAtvE5R+jt5TxTZ '' SIG '' gwWL9DmIjGbP0dqouGyc5FYPoqW6WBsdtBPaL/sxdDGW '' SIG '' M77U4g14/8UJMIIF1zCCA7+gAwIBAgIKYQd2VgAAAAAA '' SIG '' CDANBgkqhkiG9w0BAQsFADCBiDELMAkGA1UEBhMCVVMx '' SIG '' EzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1Jl '' SIG '' ZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3Jh '' SIG '' dGlvbjEyMDAGA1UEAxMpTWljcm9zb2Z0IFJvb3QgQ2Vy '' SIG '' dGlmaWNhdGUgQXV0aG9yaXR5IDIwMTAwHhcNMTExMDE5 '' SIG '' MTg0MTQyWhcNMjYxMDE5MTg1MTQyWjCBhDELMAkGA1UE '' SIG '' BhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNV '' SIG '' BAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBD '' SIG '' b3Jwb3JhdGlvbjEuMCwGA1UEAxMlTWljcm9zb2Z0IFdp '' SIG '' bmRvd3MgUHJvZHVjdGlvbiBQQ0EgMjAxMTCCASIwDQYJ '' SIG '' KoZIhvcNAQEBBQADggEPADCCAQoCggEBAN0Mu6LkLgnj '' SIG '' 58X3lmm8ACG9aTMz760Ey1SA7gaDu8UghNn30ovzOLCr '' SIG '' pK0tfGJ5Bf/jSj8ENSBw48Tna+CcwDZ16Yox3Y1w5dw3 '' SIG '' tXRGlihbh2AjLL/cR6Vn91EnnnLrB6bJuR47UzV85dPs '' SIG '' J7mHHP65ySMJb6hGkcFuljxB08ujP10Cak3saR8lKFw2 '' SIG '' //1DFQqU4Bm0z9/CEuLCWyfuJ3gwi1sqCWsiiVNgFizA '' SIG '' aB1TuuxJ851hjIVoCXNEXX2iVCvdefcVzzVdbBwrXM68 '' SIG '' nCOLb261Jtk2E8NP1ieuuTI7QZIs4cfNd+iqVE73XAsE '' SIG '' h2W0QxiosuBtGXfsWiT6SAMCAwEAAaOCAUMwggE/MBAG '' SIG '' CSsGAQQBgjcVAQQDAgEAMB0GA1UdDgQWBBSpKQI5jhbE '' SIG '' l3jNkPmeT5rhfFWvUzAZBgkrBgEEAYI3FAIEDB4KAFMA '' SIG '' dQBiAEMAQTALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUw '' SIG '' AwEB/zAfBgNVHSMEGDAWgBTV9lbLj+iiXGJo0T2UkFvX '' SIG '' zpoYxDBWBgNVHR8ETzBNMEugSaBHhkVodHRwOi8vY3Js '' SIG '' Lm1pY3Jvc29mdC5jb20vcGtpL2NybC9wcm9kdWN0cy9N '' SIG '' aWNSb29DZXJBdXRfMjAxMC0wNi0yMy5jcmwwWgYIKwYB '' SIG '' BQUHAQEETjBMMEoGCCsGAQUFBzAChj5odHRwOi8vd3d3 '' SIG '' Lm1pY3Jvc29mdC5jb20vcGtpL2NlcnRzL01pY1Jvb0Nl '' SIG '' ckF1dF8yMDEwLTA2LTIzLmNydDANBgkqhkiG9w0BAQsF '' SIG '' AAOCAgEAFPx8cVGlecJusu85Prw8Ug9uKz8QE3P+qGjQ '' SIG '' SKY0TYqWBSbuMUaQYXnW/zguRWv0wOUouNodj4rbCdca '' SIG '' x0wKNmZqjOwb1wSQqBgXpJu54kAyNnbEwVrGv+QEwOoW '' SIG '' 06zDaO9irN1UbFAwWKbrfP6Up06O9Ox8hnNXwlIhczRa '' SIG '' 86OKVsgE2gcJ7fiL4870fo6u8PYLigj7P8kdcn9TuOu+ '' SIG '' Y+DjPTFlsIHl8qzNFqSfPaixm8JC0JCEX1Qd/4nquh1H '' SIG '' kG+wc05Bn0CfX+WhKrIRkXOKISjwzt5zOV8+q1xg7N8D '' SIG '' EKjTCen09paFtn9RiGZHGY2isBI9gSpoBXe7kUxie7bB '' SIG '' B8e6eoc0Aw5LYnqZ6cr8zko3yS2kV3wc/j3cuA9a+tbE '' SIG '' swKFAjrqs9lu5GkhN96B0fZ1GQVn05NXXikbOcjuLeHN '' SIG '' 5EVzW9DSznqrFhmCRljQXp2Bs2evbDXyvOU/JOI1ogp1 '' SIG '' BvYYVpnUeCzRBRvr0IgBnaoQ8QXfun4sY7cGmyMhxPl4 '' SIG '' bOJYFwY2K5ESA8yk2fItuvmUnUDtGEXxzopcaz6rA9Nw '' SIG '' GCoKauBfR9HVYwoy8q/XNh8qcFrlQlkIcUtXun6DgfAh '' SIG '' PPQcwcW5kJMOiEWThumxIJm+mMvFlaRdYtagYwggvXUQ '' SIG '' d30980W5n5efy1eAbzOpBM93pGIcWX4xghpgMIIaXAIB '' SIG '' ATCBnDCBhDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldh '' SIG '' c2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNV '' SIG '' BAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEuMCwGA1UE '' SIG '' AxMlTWljcm9zb2Z0IFdpbmRvd3MgUHJvZHVjdGlvbiBQ '' SIG '' Q0EgMjAxMQITMwAABRhBhBmty60pTwAAAAAFGDANBglg '' SIG '' hkgBZQMEAgEFAKCB+jAZBgkqhkiG9w0BCQMxDAYKKwYB '' SIG '' BAGCNwIBBDAvBgkqhkiG9w0BCQQxIgQgmJ1ozAbGrtPI '' SIG '' 5shQ1lBLDn6F0Z3t7d+VVfkHsjGITbkwUAYKKwYBBAGC '' SIG '' NwoDHDFCDEAxRTJENjk4QkIzQjBDM0I5Mzg2QUE2NTdD '' SIG '' RUZDNUE5MjUxOTA1ODBCMDgwMkFGRUM4NzUyNUY1NUY1 '' SIG '' RkNGQ0ExMFoGCisGAQQBgjcCAQwxTDBKoCSAIgBNAGkA '' SIG '' YwByAG8AcwBvAGYAdAAgAFcAaQBuAGQAbwB3AHOhIoAg '' SIG '' aHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3dpbmRvd3Mw '' SIG '' DQYJKoZIhvcNAQEBBQAEggEANMpvt5dZVAMqLLgmcCku '' SIG '' 2bfK0NDEptS0wp01iMgHPA3l+51qDOBRu41KsE9RXmko '' SIG '' pUnt6kNJjopgDADLkw6v0PpYS9CXQ9m69NsuQAFkpHlG '' SIG '' E9BLR5hZ6PZRdgtfvIn/3wPfWf+BH5lsFNRLrFCuoqAR '' SIG '' mYiAM1xgUxJSf+jv/hpjU4vhZrgH91nHMqFENtoEUTgd '' SIG '' iMXYf8JodPD+e7ILpf1FhgGrI+MSoSMX6ACD9khA07HK '' SIG '' VoHG2GtIsBXtZH56o763Gu8sJ6pwUEX66l0BuaXp80H1 '' SIG '' KiHprbsEJYPSuCw76fe8iZ5irdwNNUDAth9l+wpqi4ak '' SIG '' Ex5To50h7r6g86GCF5cwgheTBgorBgEEAYI3AwMBMYIX '' SIG '' gzCCF38GCSqGSIb3DQEHAqCCF3AwghdsAgEDMQ8wDQYJ '' SIG '' YIZIAWUDBAIBBQAwggFSBgsqhkiG9w0BCRABBKCCAUEE '' SIG '' ggE9MIIBOQIBAQYKKwYBBAGEWQoDATAxMA0GCWCGSAFl '' SIG '' AwQCAQUABCAG4ZAsq0cUXTBXsruNA0bv4kCBcZnViSBR '' SIG '' N/mJx48wWAIGaedewLtUGBMyMDI2MDUwNjEwNDEyNS45 '' SIG '' NTVaMASAAgH0oIHRpIHOMIHLMQswCQYDVQQGEwJVUzET '' SIG '' MBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVk '' SIG '' bW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0 '' SIG '' aW9uMSUwIwYDVQQLExxNaWNyb3NvZnQgQW1lcmljYSBP '' SIG '' cGVyYXRpb25zMScwJQYDVQQLEx5uU2hpZWxkIFRTUyBF '' SIG '' U046QTQwMC0wNUUwLUQ5NDcxJTAjBgNVBAMTHE1pY3Jv '' SIG '' c29mdCBUaW1lLVN0YW1wIFNlcnZpY2WgghHtMIIHIDCC '' SIG '' BQigAwIBAgITMwAAAijwpYfX88geQAABAAACKDANBgkq '' SIG '' hkiG9w0BAQsFADB8MQswCQYDVQQGEwJVUzETMBEGA1UE '' SIG '' CBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEe '' SIG '' MBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSYw '' SIG '' JAYDVQQDEx1NaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0Eg '' SIG '' MjAxMDAeFw0yNjAyMTkxOTQwMDZaFw0yNzA1MTcxOTQw '' SIG '' MDZaMIHLMQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2Fz '' SIG '' aGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UE '' SIG '' ChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSUwIwYDVQQL '' SIG '' ExxNaWNyb3NvZnQgQW1lcmljYSBPcGVyYXRpb25zMScw '' SIG '' JQYDVQQLEx5uU2hpZWxkIFRTUyBFU046QTQwMC0wNUUw '' SIG '' LUQ5NDcxJTAjBgNVBAMTHE1pY3Jvc29mdCBUaW1lLVN0 '' SIG '' YW1wIFNlcnZpY2UwggIiMA0GCSqGSIb3DQEBAQUAA4IC '' SIG '' DwAwggIKAoICAQCujvbk/sqcCSReZaJfCuf1NwRcc7Xk '' SIG '' nhE6wkLofkNj1mxEAg35qy2xcFjgjartVvA09W8QHcpy '' SIG '' MqVSXOTxNHJsmk0qP2CDLvUAulWg7aS5oBORpEX1oz3n '' SIG '' 0R2nPqeH0IHK1zJxjxaHW21AbuZ0Z+wM3WYNzkBlcHmV '' SIG '' e03ZG7rlk28h72r5P5ME8FGpFmYW5Hl7psKbgLEfrYAi '' SIG '' tpttsb+sZsBUI+hMKl4uLJYotKyZv1ewOIinBfRU8Qos '' SIG '' ivjofaBezUf9NdV+iGrWh321WnSsK3A/Jl6GLtbSWXcJ '' SIG '' WULgbxuqnobPK+YlB3174TMWTgX4YWjG7o0Otz/pjHNC '' SIG '' KBbB788dynhLdGY6B08E9+4SGrRpsty4iJHOydHCA5M4 '' SIG '' i5yYRwsdut+gmvxIpT8yNXJcjJCg0vO8mv/nFY9Wytv2 '' SIG '' qmCtCFFivGUWqU20/sUeRooQZGiQOJQn095Cj3isIsvR '' SIG '' P8KU7hN/EDI8HVsb/NPzMFLvRznrRnj0TOnDiOTUcnYw '' SIG '' mk+XfoS1owskcCCCwHnbC00D58z83y7K5ZJB745hcn4C '' SIG '' E2nR3e6RGsr42y5qtt6Mdz/s7MTnDS2UmVHWX1X/HZe3 '' SIG '' UlX8gj/t63L50xIPqkRCBEdM1ADNUaSfo9OQiKb/bj1d '' SIG '' iZCGTfEDUBBLop1mhkwIF82faplV2busZ+U4kQIDAQAB '' SIG '' o4IBSTCCAUUwHQYDVR0OBBYEFKrJpYz48tzouvVkBVth '' SIG '' ASFpQ93DMB8GA1UdIwQYMBaAFJ+nFV0AXmJdg/Tl0mWn '' SIG '' G1M1GelyMF8GA1UdHwRYMFYwVKBSoFCGTmh0dHA6Ly93 '' SIG '' d3cubWljcm9zb2Z0LmNvbS9wa2lvcHMvY3JsL01pY3Jv '' SIG '' c29mdCUyMFRpbWUtU3RhbXAlMjBQQ0ElMjAyMDEwKDEp '' SIG '' LmNybDBsBggrBgEFBQcBAQRgMF4wXAYIKwYBBQUHMAKG '' SIG '' UGh0dHA6Ly93d3cubWljcm9zb2Z0LmNvbS9wa2lvcHMv '' SIG '' Y2VydHMvTWljcm9zb2Z0JTIwVGltZS1TdGFtcCUyMFBD '' SIG '' QSUyMDIwMTAoMSkuY3J0MAwGA1UdEwEB/wQCMAAwFgYD '' SIG '' VR0lAQH/BAwwCgYIKwYBBQUHAwgwDgYDVR0PAQH/BAQD '' SIG '' AgeAMA0GCSqGSIb3DQEBCwUAA4ICAQCQ6NfLmrRahgVt '' SIG '' gWg383GaS07fHyod6bhcUONt2tet+6BaNuH0r7ABkVHh '' SIG '' eOpxBdrUrOEYVEaIii9dK3cuZLNmp1iUAx/VbmOZYl7x '' SIG '' z+tNrjCWqrg1jQmq0oRB8iE4QJpwNhGP67oY5huYIU0D '' SIG '' 4lhDoahqfgKJn/0Bk+9UKDPw5XlUYmreFmJlj9YQzcPP '' SIG '' ep8MxBXxh/Y5I7vQeRaW5SjtiLQOLRk3ggvraDs5Sf49 '' SIG '' MJV6/BwxXC2rvUfEFX6SUDooqKIE9NgVIRq0RZu7Ot0i '' SIG '' 0Is+HvPP0hB6KwOxMg1SWKOfTtFpWpdo8MJvgKCHkPpX '' SIG '' EzgprP+pyIHuO7gVRlSTsbYBFLh2yId/itM4uYL0R+2S '' SIG '' SBBTpSSRthrGuEmElI5BCHMxzMg/oqHSPwZAIAkM2C4x '' SIG '' xi0St7qMuA+m+ZzFYkfoF41QoSJn+HjqhqWYQ0m/SO9/ '' SIG '' KnJRJJUwMd5TiMnjZ+E/DJiUry5udiWyQpvfj2hQFI0d '' SIG '' jhahoAXDazeEciLF2uEnTur9UfjcwOun/oMY+ULftnOi '' SIG '' 2jKLMrreV097akzz/JxpnDgYJU/tgU7fQflg7IqiL9+0 '' SIG '' 276+joQHo21mVeY5YD8Kh/kUaY6Jm/OTM88G7evTz/qn '' SIG '' RumxovTjMStvpbAHNRhmSTdIPTV32CyuxDKS/V5a5iwA '' SIG '' +f9ViBo+wjCCB3EwggVZoAMCAQICEzMAAAAVxedrngKb '' SIG '' SZkAAAAAABUwDQYJKoZIhvcNAQELBQAwgYgxCzAJBgNV '' SIG '' BAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYD '' SIG '' VQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQg '' SIG '' Q29ycG9yYXRpb24xMjAwBgNVBAMTKU1pY3Jvc29mdCBS '' SIG '' b290IENlcnRpZmljYXRlIEF1dGhvcml0eSAyMDEwMB4X '' SIG '' DTIxMDkzMDE4MjIyNVoXDTMwMDkzMDE4MzIyNVowfDEL '' SIG '' MAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24x '' SIG '' EDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jv '' SIG '' c29mdCBDb3Jwb3JhdGlvbjEmMCQGA1UEAxMdTWljcm9z '' SIG '' b2Z0IFRpbWUtU3RhbXAgUENBIDIwMTAwggIiMA0GCSqG '' SIG '' SIb3DQEBAQUAA4ICDwAwggIKAoICAQDk4aZM57RyIQt5 '' SIG '' osvXJHm9DtWC0/3unAcH0qlsTnXIyjVX9gF/bErg4r25 '' SIG '' PhdgM/9cT8dm95VTcVrifkpa/rg2Z4VGIwy1jRPPdzLA '' SIG '' EBjoYH1qUoNEt6aORmsHFPPFdvWGUNzBRMhxXFExN6AK '' SIG '' OG6N7dcP2CZTfDlhAnrEqv1yaa8dq6z2Nr41JmTamDu6 '' SIG '' GnszrYBbfowQHJ1S/rboYiXcag/PXfT+jlPP1uyFVk3v '' SIG '' 3byNpOORj7I5LFGc6XBpDco2LXCOMcg1KL3jtIckw+DJ '' SIG '' j361VI/c+gVVmG1oO5pGve2krnopN6zL64NF50ZuyjLV '' SIG '' wIYwXE8s4mKyzbnijYjklqwBSru+cakXW2dg3viSkR4d '' SIG '' Pf0gz3N9QZpGdc3EXzTdEonW/aUgfX782Z5F37ZyL9t9 '' SIG '' X4C626p+Nuw2TPYrbqgSUei/BQOj0XOmTTd0lBw0gg/w '' SIG '' EPK3Rxjtp+iZfD9M269ewvPV2HM9Q07BMzlMjgK8Qmgu '' SIG '' EOqEUUbi0b1qGFphAXPKZ6Je1yh2AuIzGHLXpyDwwvoS '' SIG '' CtdjbwzJNmSLW6CmgyFdXzB0kZSU2LlQ+QuJYfM2BjUY '' SIG '' hEfb3BvR/bLUHMVr9lxSUV0S2yW6r1AFemzFER1y7435 '' SIG '' UsSFF5PAPBXbGjfHCBUYP3irRbb1Hode2o+eFnJpxq57 '' SIG '' t7c+auIurQIDAQABo4IB3TCCAdkwEgYJKwYBBAGCNxUB '' SIG '' BAUCAwEAATAjBgkrBgEEAYI3FQIEFgQUKqdS/mTEmr6C '' SIG '' kTxGNSnPEP8vBO4wHQYDVR0OBBYEFJ+nFV0AXmJdg/Tl '' SIG '' 0mWnG1M1GelyMFwGA1UdIARVMFMwUQYMKwYBBAGCN0yD '' SIG '' fQEBMEEwPwYIKwYBBQUHAgEWM2h0dHA6Ly93d3cubWlj '' SIG '' cm9zb2Z0LmNvbS9wa2lvcHMvRG9jcy9SZXBvc2l0b3J5 '' SIG '' Lmh0bTATBgNVHSUEDDAKBggrBgEFBQcDCDAZBgkrBgEE '' SIG '' AYI3FAIEDB4KAFMAdQBiAEMAQTALBgNVHQ8EBAMCAYYw '' SIG '' DwYDVR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBTV9lbL '' SIG '' j+iiXGJo0T2UkFvXzpoYxDBWBgNVHR8ETzBNMEugSaBH '' SIG '' hkVodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpL2Ny '' SIG '' bC9wcm9kdWN0cy9NaWNSb29DZXJBdXRfMjAxMC0wNi0y '' SIG '' My5jcmwwWgYIKwYBBQUHAQEETjBMMEoGCCsGAQUFBzAC '' SIG '' hj5odHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20vcGtpL2Nl '' SIG '' cnRzL01pY1Jvb0NlckF1dF8yMDEwLTA2LTIzLmNydDAN '' SIG '' BgkqhkiG9w0BAQsFAAOCAgEAnVV9/Cqt4SwfZwExJFvh '' SIG '' nnJL/Klv6lwUtj5OR2R4sQaTlz0xM7U518JxNj/aZGx8 '' SIG '' 0HU5bbsPMeTCj/ts0aGUGCLu6WZnOlNN3Zi6th542DYu '' SIG '' nKmCVgADsAW+iehp4LoJ7nvfam++Kctu2D9IdQHZGN5t '' SIG '' ggz1bSNU5HhTdSRXud2f8449xvNo32X2pFaq95W2KFUn '' SIG '' 0CS9QKC/GbYSEhFdPSfgQJY4rPf5KYnDvBewVIVCs/wM '' SIG '' nosZiefwC2qBwoEZQhlSdYo2wh3DYXMuLGt7bj8sCXgU '' SIG '' 6ZGyqVvfSaN0DLzskYDSPeZKPmY7T7uG+jIa2Zb0j/aR '' SIG '' AfbOxnT99kxybxCrdTDFNLB62FD+CljdQDzHVG2dY3RI '' SIG '' LLFORy3BFARxv2T5JL5zbcqOCb2zAVdJVGTZc9d/HltE '' SIG '' AY5aGZFrDZ+kKNxnGSgkujhLmm77IVRrakURR6nxt67I '' SIG '' 6IleT53S0Ex2tVdUCbFpAUR+fKFhbHP+CrvsQWY9af3L '' SIG '' wUFJfn6Tvsv4O+S3Fb+0zj6lMVGEvL8CwYKiexcdFYmN '' SIG '' cP7ntdAoGokLjzbaukz5m/8K6TT4JDVnK+ANuOaMmdbh '' SIG '' IurwJ0I9JZTmdHRbatGePu1+oDEzfbzL6Xu/OHBE0ZDx '' SIG '' yKs6ijoIYn/ZcGNTTY3ugm2lBRDBcQZqELQdVTNYs6Fw '' SIG '' ZvKhggNQMIICOAIBATCB+aGB0aSBzjCByzELMAkGA1UE '' SIG '' BhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNV '' SIG '' BAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBD '' SIG '' b3Jwb3JhdGlvbjElMCMGA1UECxMcTWljcm9zb2Z0IEFt '' SIG '' ZXJpY2EgT3BlcmF0aW9uczEnMCUGA1UECxMeblNoaWVs '' SIG '' ZCBUU1MgRVNOOkE0MDAtMDVFMC1EOTQ3MSUwIwYDVQQD '' SIG '' ExxNaWNyb3NvZnQgVGltZS1TdGFtcCBTZXJ2aWNloiMK '' SIG '' AQEwBwYFKw4DAhoDFQB1rbmFkzS7qAK1Oav08AUnhbNI '' SIG '' UqCBgzCBgKR+MHwxCzAJBgNVBAYTAlVTMRMwEQYDVQQI '' SIG '' EwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4w '' SIG '' HAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xJjAk '' SIG '' BgNVBAMTHU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQSAy '' SIG '' MDEwMA0GCSqGSIb3DQEBCwUAAgUA7aRP9jAiGA8yMDI2 '' SIG '' MDUwNTExMTYwNloYDzIwMjYwNTA2MTExNjA2WjB3MD0G '' SIG '' CisGAQQBhFkKBAExLzAtMAoCBQDtpE/2AgEAMAoCAQAC '' SIG '' AgHLAgH/MAcCAQACAhULMAoCBQDtpaF2AgEAMDYGCisG '' SIG '' AQQBhFkKBAIxKDAmMAwGCisGAQQBhFkKAwKgCjAIAgEA '' SIG '' AgMHoSChCjAIAgEAAgMBhqAwDQYJKoZIhvcNAQELBQAD '' SIG '' ggEBAB+7nj/krNRMEyGqh4EKyDu1TUuE1IZwW5TLG4Ni '' SIG '' K/U4shiR0WZbDWW+VEjRLSBwnqXmnVQ7WGQai5n4hKqn '' SIG '' 8JblCQo9LijYfvy7OCEtCGCWIdgwjs0gPo39Eo940FjN '' SIG '' yVE1+8KjvuEbtdAz4rvzHqWCbywkCqNYLr2F1xCED762 '' SIG '' 0V2mA/oIJl3TSnn331VuEioCOMFX9ayCzDMFa34Im8Zd '' SIG '' 0kuoWXuE7o02meR4DUQKrN2g+q+IrhwPQsD4sD6D8VQp '' SIG '' ++rmK9U2hVztIP4Wk0GnnuMdUhJImF14pzXHmRWpkU2O '' SIG '' qSmCXKeI2UGW5KPzTOwYoyB2vqahE8Sr0rWobk0xggQN '' SIG '' MIIECQIBATCBkzB8MQswCQYDVQQGEwJVUzETMBEGA1UE '' SIG '' CBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEe '' SIG '' MBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSYw '' SIG '' JAYDVQQDEx1NaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0Eg '' SIG '' MjAxMAITMwAAAijwpYfX88geQAABAAACKDANBglghkgB '' SIG '' ZQMEAgEFAKCCAUowGgYJKoZIhvcNAQkDMQ0GCyqGSIb3 '' SIG '' DQEJEAEEMC8GCSqGSIb3DQEJBDEiBCBmwOK3FzehwPoE '' SIG '' H6fV699lmL66qb27sFpjolqxkqXH+TCB+gYLKoZIhvcN '' SIG '' AQkQAi8xgeowgecwgeQwgb0EIFWxikZRYGNf4oEVZK1e '' SIG '' T45H+3GQ3/qxV75VwuBt+iLXMIGYMIGApH4wfDELMAkG '' SIG '' A1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAO '' SIG '' BgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29m '' SIG '' dCBDb3Jwb3JhdGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0 '' SIG '' IFRpbWUtU3RhbXAgUENBIDIwMTACEzMAAAIo8KWH1/PI '' SIG '' HkAAAQAAAigwIgQgYhncZN0hT0WC3hhHRY1/TINR0P0e '' SIG '' zFLwRE+6rjJehpgwDQYJKoZIhvcNAQELBQAEggIAS/ml '' SIG '' 4rhT5LLoZ6WYGbhu1WbqXyQDQpfLbO96xjdXw4uiReHR '' SIG '' tAGCRh9lq7BBU9ueuOSdn5d+TDwI48sxfCnckL2quArl '' SIG '' Bg/cceXLZdwWI7+mQcc5xjh4FPcB2W9tS/OLvBId6kl/ '' SIG '' IGf9geTwLwciue6p3yJqEzulc9QyDqcG5WxFkEeMRjWR '' SIG '' VI3JiKnWD7wmmnnanVy8n2Ovu1gjyZ88MnRXRqElOtk6 '' SIG '' JExRqtjRCI5JFAb9bvGKsSuQ33Bv16wk0EdAOzGS7/CO '' SIG '' 1m2f5K9cxus8CaojjLN5hfPJvVv7y3qSwhRLiV5Ua7Jl '' SIG '' ddEuygem+MvQR4s8RSEyCKHewNGYGSEOer9LXGA7GU67 '' SIG '' xoXEKdJmQkBsBBPj2Yr7Cz/YvSt19Ax5Fjtp9QAUFOJw '' SIG '' xsFsN5YdqwvsguTn/TvzQvnqxWrcl5uKSUKCaO6XC9fa '' SIG '' dFheexiEX/yllTYQ2GFFxWGL7FP3B5tALciZ/izQXOVt '' SIG '' aKG93L4LPxWtv+mwh0qwvdXpdhmcOHPSx1EGYft1jtWx '' SIG '' lDUvMmaNiw3LMXfPpLuY41oBRwf5AFjJqLaLpeHlxINe '' SIG '' BFmU2WNtyW2zXkuXNzmhqFGmxsmN4bnU1I/5vHnRDkCd '' SIG '' iGFxaOklUHrqdCrtjhMV4bivgQA0Dr/BVEjH9HQMgzwG '' SIG '' F2YBreBdTb+yXxeL5hE= '' SIG '' End signature block