Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1539 lines
54 KiB

  1. '----------------------------------------------------------------------
  2. '
  3. ' Copyright (c) Microsoft Corporation. All rights reserved.
  4. '
  5. ' Abstract:
  6. '
  7. ' prncnfg.vbs - printer configuration script for WMI on Whistler used to get
  8. ' and set printer configuration also used to rename a printer
  9. '
  10. ' Usage:
  11. ' prncnfg [-gtx?] [-s server] [-p printer] [-u user name] [-w password]
  12. ' [-z new printer name] [-r port name] [-l location] [-m comment]
  13. ' [-h share name] [-f sep-file] [-y data-type] [-st start time]
  14. ' [-ut until time] [-o priority] [-i default priority]
  15. ' [<+|->rawonly][<+|->keepprintedjobs][<+|->queued][<+|->workoffline]
  16. ' [<+|->enabledevq][<+|->docompletefirst][<+|->enablebidi]
  17. '
  18. ' Examples:
  19. ' prncnfg -g -s server -p printer
  20. ' prncnfg -x -p printer -w "new Printer"
  21. ' prncnfg -t -s server -p Printer -l "Building A/Floor 100/Office 1" -m "Color Printer"
  22. ' prncnfg -t -p printer -h "Share" +shared -direct
  23. ' prncnfg -t -p printer +rawonly +keepprintedjobs
  24. ' prncnfg -t -p printer -st 2300 -ut 0215 -o 10 -i 5
  25. '
  26. '----------------------------------------------------------------------
  27. option explicit
  28. '
  29. ' Debugging trace flags, to enable debug output trace message
  30. ' change gDebugFlag to true.
  31. '
  32. const kDebugTrace = 1
  33. const kDebugError = 2
  34. dim gDebugFlag
  35. gDebugFlag = false
  36. const kFlagUpdateOnly = 1
  37. '
  38. ' Operation action values.
  39. '
  40. const kActionUnknown = 0
  41. const kActionSet = 1
  42. const kActionGet = 2
  43. const kActionRename = 3
  44. const kErrorSuccess = 0
  45. const kErrorFailure = 1
  46. '
  47. ' Constants for the parameter dictionary
  48. '
  49. const kServerName = 1
  50. const kPrinterName = 2
  51. const kNewPrinterName = 3
  52. const kShareName = 4
  53. const kPortName = 5
  54. const kDriverName = 6
  55. const kComment = 7
  56. const kLocation = 8
  57. const kSepFile = 9
  58. const kPrintProc = 10
  59. const kDataType = 11
  60. const kParameters = 12
  61. const kPriority = 13
  62. const kDefaultPriority = 14
  63. const kStartTime = 15
  64. const kUntilTime = 16
  65. const kQueued = 17
  66. const kDirect = 18
  67. const kDefault = 19
  68. const kShared = 20
  69. const kNetwork = 21
  70. const kHidden = 23
  71. const kLocal = 24
  72. const kEnableDevq = 25
  73. const kKeepPrintedJobs = 26
  74. const kDoCompleteFirst = 27
  75. const kWorkOffline = 28
  76. const kEnableBidi = 29
  77. const kRawOnly = 30
  78. const kPublished = 31
  79. const kUserName = 32
  80. const kPassword = 33
  81. const kNameSpace = "root\cimv2"
  82. '
  83. ' Generic strings
  84. '
  85. const L_Empty_Text = ""
  86. const L_Space_Text = " "
  87. const L_Error_Text = "Error"
  88. const L_Success_Text = "Success"
  89. const L_Failed_Text = "Failed"
  90. const L_Hex_Text = "0x"
  91. const L_Printer_Text = "Printer"
  92. const L_Operation_Text = "Operation"
  93. const L_Provider_Text = "Provider"
  94. const L_Description_Text = "Description"
  95. const L_Debug_Text = "Debug:"
  96. '
  97. ' General usage messages
  98. '
  99. const L_Help_Help_General01_Text = "Usage: prncnfg [-gtx?] [-s server][-p printer][-z new printer name]"
  100. const L_Help_Help_General02_Text = " [-u user name][-w password][-r port name][-l location]"
  101. const L_Help_Help_General03_Text = " [-m comment][-h share name][-f sep file][-y datatype]"
  102. const L_Help_Help_General04_Text = " [-st start time][-ut until time][-i default priority]"
  103. const L_Help_Help_General05_Text = " [-o priority][<+|->shared][<+|->direct][<+|->hidden]"
  104. const L_Help_Help_General06_Text = " [<+|->published][<+|->rawonly][<+|->queued][<+|->enablebidi]"
  105. const L_Help_Help_General07_Text = " [<+|->keepprintedjobs][<+|->workoffline][<+|->enabledevq]"
  106. const L_Help_Help_General08_Text = " [<+|->docompletefirst]"
  107. const L_Help_Help_General09_Text = "Arguments:"
  108. const L_Help_Help_General10_Text = "-f - separator file name"
  109. const L_Help_Help_General11_Text = "-g - get configuration"
  110. const L_Help_Help_General12_Text = "-h - share name"
  111. const L_Help_Help_General13_Text = "-i - default priority"
  112. const L_Help_Help_General14_Text = "-l - location string"
  113. const L_Help_Help_General15_Text = "-m - comment string"
  114. const L_Help_Help_General16_Text = "-o - priority"
  115. const L_Help_Help_General17_Text = "-p - printer name"
  116. const L_Help_Help_General18_Text = "-r - port name"
  117. const L_Help_Help_General19_Text = "-s - server name"
  118. const L_Help_Help_General20_Text = "-st - start time"
  119. const L_Help_Help_General21_Text = "-t - set configuration"
  120. const L_Help_Help_General22_Text = "-u - user name"
  121. const L_Help_Help_General23_Text = "-ut - until time"
  122. const L_Help_Help_General24_Text = "-w - password"
  123. const L_Help_Help_General25_Text = "-x - change printer name"
  124. const L_Help_Help_General26_Text = "-y - data type string"
  125. const L_Help_Help_General27_Text = "-z - new printer name"
  126. const L_Help_Help_General28_Text = "-? - display command usage"
  127. const L_Help_Help_General29_Text = "Examples:"
  128. const L_Help_Help_General30_Text = "prncnfg -g -s server -p printer"
  129. const L_Help_Help_General31_Text = "prncnfg -x -s server -p printer -z ""new printer"""
  130. const L_Help_Help_General32_Text = "prncnfg -t -p printer -l ""Building A/Floor 100/Office 1"" -m ""Color Printer"""
  131. const L_Help_Help_General33_Text = "prncnfg -t -p printer -h ""Share"" +shared -direct"
  132. const L_Help_Help_General34_Text = "prncnfg -t -p printer +rawonly +keepprintedjobs"
  133. const L_Help_Help_General35_Text = "prncnfg -t -p printer -st 2300 -ut 0215 -o 1 -i 5"
  134. '
  135. ' Messages to be displayed if the scripting host is not cscript
  136. '
  137. const L_Help_Help_Host01_Text = "Please run this script using CScript."
  138. const L_Help_Help_Host02_Text = "This can be achieved by"
  139. const L_Help_Help_Host03_Text = "1. Using ""CScript script.vbs arguments"" or"
  140. const L_Help_Help_Host04_Text = "2. Changing the default Windows Scripting Host to CScript"
  141. const L_Help_Help_Host05_Text = " using ""CScript //H:CScript //S"" and running the script "
  142. const L_Help_Help_Host06_Text = " ""script.vbs arguments""."
  143. '
  144. ' General error messages
  145. '
  146. const L_Text_Error_General01_Text = "The scripting host could not be determined."
  147. const L_Text_Error_General02_Text = "Unable to parse command line."
  148. const L_Text_Error_General03_Text = "Win32 error code"
  149. '
  150. ' Miscellaneous messages
  151. '
  152. const L_Text_Msg_General01_Text = "Renamed printer"
  153. const L_Text_Msg_General02_Text = "New printer name"
  154. const L_Text_Msg_General03_Text = "Unable to rename printer"
  155. const L_Text_Msg_General04_Text = "Unable to get configuration for printer"
  156. const L_Text_Msg_General05_Text = "Printer always available"
  157. const L_Text_Msg_General06_Text = "Configured printer"
  158. const L_Text_Msg_General07_Text = "Unable to configure printer"
  159. const L_Text_Msg_General08_Text = "Unable to get SWbemLocator object"
  160. const L_Text_Msg_General09_Text = "Unable to connect to WMI service"
  161. const L_Text_Msg_General10_Text = "Printer status"
  162. const L_Text_Msg_General11_Text = "Extended printer status"
  163. const L_Text_Msg_General12_Text = "Detected error state"
  164. const L_Text_Msg_General13_Text = "Extended detected error state"
  165. '
  166. ' Printer properties
  167. '
  168. const L_Text_Msg_Printer01_Text = "Server name"
  169. const L_Text_Msg_Printer02_Text = "Printer name"
  170. const L_Text_Msg_Printer03_Text = "Share name"
  171. const L_Text_Msg_Printer04_Text = "Driver name"
  172. const L_Text_Msg_Printer05_Text = "Port name"
  173. const L_Text_Msg_Printer06_Text = "Comment"
  174. const L_Text_Msg_Printer07_Text = "Location"
  175. const L_Text_Msg_Printer08_Text = "Separator file"
  176. const L_Text_Msg_Printer09_Text = "Print processor"
  177. const L_Text_Msg_Printer10_Text = "Data type"
  178. const L_Text_Msg_Printer11_Text = "Parameters"
  179. const L_Text_Msg_Printer12_Text = "Attributes"
  180. const L_Text_Msg_Printer13_Text = "Priority"
  181. const L_Text_Msg_Printer14_Text = "Default priority"
  182. const L_Text_Msg_Printer15_Text = "Start time"
  183. const L_Text_Msg_Printer16_Text = "Until time"
  184. const L_Text_Msg_Printer17_Text = "Status"
  185. const L_Text_Msg_Printer18_Text = "Job count"
  186. const L_Text_Msg_Printer19_Text = "Average pages per minute"
  187. '
  188. ' Printer attributes
  189. '
  190. const L_Text_Msg_Attrib01_Text = "direct"
  191. const L_Text_Msg_Attrib02_Text = "raw_only"
  192. const L_Text_Msg_Attrib03_Text = "local"
  193. const L_Text_Msg_Attrib04_Text = "shared"
  194. const L_Text_Msg_Attrib05_Text = "keep_printed_jobs"
  195. const L_Text_Msg_Attrib06_Text = "published"
  196. const L_Text_Msg_Attrib07_Text = "queued"
  197. const L_Text_Msg_Attrib08_Text = "default"
  198. const L_Text_Msg_Attrib09_Text = "network"
  199. const L_Text_Msg_Attrib10_Text = "enable_bidi"
  200. const L_Text_Msg_Attrib11_Text = "do_complete_first"
  201. const L_Text_Msg_Attrib12_Text = "work_offline"
  202. const L_Text_Msg_Attrib13_Text = "hidden"
  203. const L_Text_Msg_Attrib14_Text = "enable_devq_print"
  204. '
  205. ' Printer status
  206. '
  207. const L_Text_Msg_Status01_Text = "Other"
  208. const L_Text_Msg_Status02_Text = "Unknown"
  209. const L_Text_Msg_Status03_Text = "Idle"
  210. const L_Text_Msg_Status04_Text = "Printing"
  211. const L_Text_Msg_Status05_Text = "Warmup"
  212. const L_Text_Msg_Status06_Text = "Stopped printing"
  213. const L_Text_Msg_Status07_Text = "Offline"
  214. const L_Text_Msg_Status08_Text = "Paused"
  215. const L_Text_Msg_Status09_Text = "Error"
  216. const L_Text_Msg_Status10_Text = "Busy"
  217. const L_Text_Msg_Status11_Text = "Not available"
  218. const L_Text_Msg_Status12_Text = "Waiting"
  219. const L_Text_Msg_Status13_Text = "Processing"
  220. const L_Text_Msg_Status14_Text = "Initializing"
  221. const L_Text_Msg_Status15_Text = "Power save"
  222. const L_Text_Msg_Status16_Text = "Pending deletion"
  223. const L_Text_Msg_Status17_Text = "I/O active"
  224. const L_Text_Msg_Status18_Text = "Manual feed"
  225. const L_Text_Msg_Status19_Text = "No error"
  226. const L_Text_Msg_Status20_Text = "Low paper"
  227. const L_Text_Msg_Status21_Text = "No paper"
  228. const L_Text_Msg_Status22_Text = "Low toner"
  229. const L_Text_Msg_Status23_Text = "No toner"
  230. const L_Text_Msg_Status24_Text = "Door open"
  231. const L_Text_Msg_Status25_Text = "Jammed"
  232. const L_Text_Msg_Status26_Text = "Service requested"
  233. const L_Text_Msg_Status27_Text = "Output bin full"
  234. const L_Text_Msg_Status28_Text = "Paper problem"
  235. const L_Text_Msg_Status29_Text = "Cannot print page"
  236. const L_Text_Msg_Status30_Text = "User intervention required"
  237. const L_Text_Msg_Status31_Text = "Out of memory"
  238. const L_Text_Msg_Status32_Text = "Server unknown"
  239. '
  240. ' Debug messages
  241. '
  242. const L_Text_Dbg_Msg01_Text = "In function RenamePrinter"
  243. const L_Text_Dbg_Msg02_Text = "New printer name"
  244. const L_Text_Dbg_Msg03_Text = "In function GetPrinter"
  245. const L_Text_Dbg_Msg04_Text = "In function SetPrinter"
  246. const L_Text_Dbg_Msg05_Text = "In function ParseCommandLine"
  247. main
  248. '
  249. ' Main execution starts here
  250. '
  251. sub main
  252. dim iAction
  253. dim iRetval
  254. dim oParamDict
  255. '
  256. ' Abort if the host is not cscript
  257. '
  258. if not IsHostCscript() then
  259. call wscript.echo(L_Help_Help_Host01_Text & vbCRLF & L_Help_Help_Host02_Text & vbCRLF & _
  260. L_Help_Help_Host03_Text & vbCRLF & L_Help_Help_Host04_Text & vbCRLF & _
  261. L_Help_Help_Host05_Text & vbCRLF & L_Help_Help_Host06_Text & vbCRLF)
  262. wscript.quit
  263. end if
  264. set oParamDict = CreateObject("Scripting.Dictionary")
  265. iRetval = ParseCommandLine(iAction, oParamDict)
  266. if iRetval = kErrorSuccess then
  267. select case iAction
  268. case kActionSet
  269. iRetval = SetPrinter(oParamDict)
  270. case kActionGet
  271. iRetval = GetPrinter(oParamDict)
  272. case kActionRename
  273. iRetval = RenamePrinter(oParamDict)
  274. case else
  275. Usage(True)
  276. exit sub
  277. end select
  278. end if
  279. end sub
  280. '
  281. ' Rename printer
  282. '
  283. function RenamePrinter(oParamDict)
  284. on error resume next
  285. DebugPrint kDebugTrace, L_Text_Dbg_Msg01_Text
  286. DebugPrint kDebugTrace, L_Text_Msg_Printer01_Text & L_Space_Text & oParamDict.Item(kServerName)
  287. DebugPrint kDebugTrace, L_Text_Msg_Printer02_Text & L_Space_Text & oParamDict.Item(kPrinterName)
  288. DebugPrint kDebugTrace, L_Text_Dbg_Msg02_Text & L_Space_Text & oParamDict.Item(kNewPrinterName)
  289. dim oPrinter
  290. dim oService
  291. dim iRetval
  292. dim uResult
  293. dim strServer
  294. dim strPrinter
  295. dim strNewName
  296. dim strUser
  297. dim strPassword
  298. iRetval = kErrorFailure
  299. strServer = oParamDict.Item(kServerName)
  300. strPrinter = oParamDict.Item(kPrinterName)
  301. strNewName = oParamDict.Item(kNewPrinterName)
  302. strUser = oParamDict.Item(kUserName)
  303. strPassword = oParamDict.Item(kPassword)
  304. if WmiConnect(strServer, kNameSpace, strUser, strPassword, oService) then
  305. set oPrinter = oService.Get("Win32_Printer.DeviceID='" & strPrinter & "'")
  306. else
  307. RenamePrinter = kErrorFailure
  308. exit function
  309. end if
  310. '
  311. ' Check if Get was successful
  312. '
  313. if Err.Number = kErrorSuccess then
  314. uResult = oPrinter.RenamePrinter(strNewName)
  315. if Err.Number = kErrorSuccess then
  316. if uResult = kErrorSuccess then
  317. wscript.echo L_Text_Msg_General01_Text & L_Space_Text & strPrinter
  318. wscript.echo L_Text_Msg_General02_Text & L_Space_Text & strNewName
  319. iRetval = kErrorSuccess
  320. else
  321. wscript.echo L_Text_Msg_General03_Text & L_Space_Text & strPrinter & L_Space_Text _
  322. & L_Text_Error_General03_Text & L_Space_Text & uResult
  323. end if
  324. else
  325. wscript.echo L_Text_Msg_General04_Text & L_Space_Text & strPrinter & L_Space_Text _
  326. & L_Error_Text & L_Space_Text & L_Hex_Text & hex(Err.Number) & L_Space_Text _
  327. & Err.Description
  328. end if
  329. else
  330. wscript.echo L_Text_Msg_General04_Text & L_Space_Text & strPrinter & L_Space_Text _
  331. & L_Error_Text & L_Space_Text & L_Hex_Text & hex(Err.Number) & L_Space_Text _
  332. & Err.Description
  333. '
  334. ' Try getting extended error information
  335. '
  336. call LastError()
  337. end if
  338. RenamePrinter = iRetval
  339. end function
  340. '
  341. ' Get printer configuration
  342. '
  343. function GetPrinter(oParamDict)
  344. on error resume next
  345. DebugPrint kDebugTrace, L_Text_Dbg_Msg03_Text
  346. DebugPrint kDebugTrace, L_Text_Msg_Printer01_Text & L_Space_Text & oParamDict.Item(kServerName)
  347. DebugPrint kDebugTrace, L_Text_Msg_Printer02_Text & L_Space_Text & oParamDict.Item(kPrinterName)
  348. dim oPrinter
  349. dim oService
  350. dim iRetval
  351. dim uResult
  352. dim strServer
  353. dim strPrinter
  354. dim strAttributes
  355. dim strStart
  356. dim strEnd
  357. dim strUser
  358. dim strPassword
  359. iRetval = kErrorFailure
  360. strServer = oParamDict.Item(kServerName)
  361. strPrinter = oParamDict.Item(kPrinterName)
  362. strUser = oParamDict.Item(kUserName)
  363. strPassword = oParamDict.Item(kPassword)
  364. if WmiConnect(strServer, kNameSpace, strUser, strPassword, oService) then
  365. set oPrinter = oService.Get("Win32_Printer='" & strPrinter & "'")
  366. else
  367. GetPrinter = kErrorFailure
  368. exit function
  369. end if
  370. '
  371. ' Check if Get was successful
  372. '
  373. if Err.Number = kErrorSuccess then
  374. wscript.echo L_Text_Msg_Printer01_Text & L_Space_Text & strServer
  375. wscript.echo L_Text_Msg_Printer02_Text & L_Space_Text & oPrinter.DeviceID
  376. wscript.echo L_Text_Msg_Printer03_Text & L_Space_Text & oPrinter.ShareName
  377. wscript.echo L_Text_Msg_Printer04_Text & L_Space_Text & oPrinter.DriverName
  378. wscript.echo L_Text_Msg_Printer05_Text & L_Space_Text & oPrinter.PortName
  379. wscript.echo L_Text_Msg_Printer06_Text & L_Space_Text & oPrinter.Comment
  380. wscript.echo L_Text_Msg_Printer07_Text & L_Space_Text & oPrinter.Location
  381. wscript.echo L_Text_Msg_Printer08_Text & L_Space_Text & oPrinter.SeparatorFile
  382. wscript.echo L_Text_Msg_Printer09_Text & L_Space_Text & oPrinter.PrintProcessor
  383. wscript.echo L_Text_Msg_Printer10_Text & L_Space_Text & oPrinter.PrintJobDatatype
  384. wscript.echo L_Text_Msg_Printer11_Text & L_Space_Text & oPrinter.Parameters
  385. wscript.echo L_Text_Msg_Printer13_Text & L_Space_Text & CStr(oPrinter.Priority)
  386. wscript.echo L_Text_Msg_Printer14_Text & L_Space_Text & CStr(oPrinter.DefaultPriority)
  387. strStart = Mid(CStr(oPrinter.StartTime), 9, 4)
  388. strEnd = Mid(CStr(oPrinter.UntilTime), 9, 4)
  389. if strStart <> "" and strEnd <> "" then
  390. wscript.echo L_Text_Msg_Printer15_Text & L_Space_Text & Mid(strStart, 1, 2) & "h" & Mid(strStart, 3, 2)
  391. wscript.echo L_Text_Msg_Printer16_Text & L_Space_Text & Mid(strEnd, 1, 2) & "h" & Mid(strEnd, 3, 2)
  392. else
  393. wscript.echo L_Text_Msg_General05_Text
  394. end if
  395. strAttributes = L_Text_Msg_Printer12_Text
  396. if oPrinter.Direct then
  397. strAttributes = strAttributes + L_Space_Text + L_Text_Msg_Attrib01_Text
  398. end if
  399. if oPrinter.RawOnly then
  400. strAttributes = strAttributes + L_Space_Text + L_Text_Msg_Attrib02_Text
  401. end if
  402. if oPrinter.Local then
  403. strAttributes = strAttributes + L_Space_Text + L_Text_Msg_Attrib03_Text
  404. end if
  405. if oPrinter.Shared then
  406. strAttributes = strAttributes + L_Space_Text + L_Text_Msg_Attrib04_Text
  407. end if
  408. if oPrinter.KeepPrintedJobs then
  409. strAttributes = strAttributes + L_Space_Text + L_Text_Msg_Attrib05_Text
  410. end if
  411. if oPrinter.Published then
  412. strAttributes = strAttributes + L_Space_Text + L_Text_Msg_Attrib06_Text
  413. end if
  414. if oPrinter.Queued then
  415. strAttributes = strAttributes + L_Space_Text + L_Text_Msg_Attrib07_Text
  416. end if
  417. if oPrinter.Default then
  418. strAttributes = strAttributes + L_Space_Text + L_Text_Msg_Attrib08_Text
  419. end if
  420. if oPrinter.Network then
  421. strAttributes = strAttributes + L_Space_Text + L_Text_Msg_Attrib09_Text
  422. end if
  423. if oPrinter.EnableBiDi then
  424. strAttributes = strAttributes + L_Space_Text + L_Text_Msg_Attrib10_Text
  425. end if
  426. if oPrinter.DoCompleteFirst then
  427. strAttributes = strAttributes + L_Space_Text + L_Text_Msg_Attrib11_Text
  428. end if
  429. if oPrinter.WorkOffline then
  430. strAttributes = strAttributes + L_Space_Text + L_Text_Msg_Attrib12_Text
  431. end if
  432. if oPrinter.Hidden then
  433. strAttributes = strAttributes + L_Space_Text + L_Text_Msg_Attrib13_Text
  434. end if
  435. if oPrinter.EnableDevQueryPrint then
  436. strAttributes = strAttributes + L_Space_Text + L_Text_Msg_Attrib14_Text
  437. end if
  438. wscript.echo strAttributes
  439. wscript.echo
  440. wscript.echo L_Text_Msg_General10_Text & L_Space_Text & PrnStatusToString(oPrinter.PrinterStatus)
  441. wscript.echo L_Text_Msg_General11_Text & L_Space_Text & ExtPrnStatusToString(oPrinter.ExtendedPrinterStatus)
  442. wscript.echo L_Text_Msg_General12_Text & L_Space_Text & DetectedErrorStateToString(oPrinter.DetectedErrorState)
  443. wscript.echo L_Text_Msg_General13_Text & L_Space_Text & ExtDetectedErrorStateToString(oPrinter.ExtendedDetectedErrorState)
  444. iRetval = kErrorSuccess
  445. else
  446. wscript.echo L_Text_Msg_General04_Text & L_Space_Text & oParamDict.Item(kPrinterName) & L_Space_Text _
  447. & L_Error_Text & L_Space_Text & L_Hex_Text & hex(Err.Number) & L_Space_Text _
  448. & Err.Description
  449. '
  450. ' Try getting extended error information
  451. '
  452. call LastError()
  453. end if
  454. GetPrinter = iRetval
  455. end function
  456. '
  457. ' Configure a printer
  458. '
  459. function SetPrinter(oParamDict)
  460. on error resume next
  461. DebugPrint kDebugTrace, L_Text_Dbg_Msg04_Text
  462. DebugPrint kDebugTrace, L_Text_Msg_Printer01_Text & L_Space_Text & oParamDict.Item(kServerName)
  463. DebugPrint kDebugTrace, L_Text_Msg_Printer02_Text & L_Space_Text & oParamDict.Item(kPrinterName)
  464. dim oPrinter
  465. dim oService
  466. dim iRetval
  467. dim uResult
  468. dim strServer
  469. dim strPrinter
  470. dim strUser
  471. dim strPassword
  472. iRetval = kErrorFailure
  473. strServer = oParamDict.Item(kServerName)
  474. strPrinter = oParamDict.Item(kPrinterName)
  475. strNewName = oParamDict.Item(kNewPrinterName)
  476. strUser = oParamDict.Item(kUserName)
  477. strPassword = oParamDict.Item(kPassword)
  478. if WmiConnect(strServer, kNameSpace, strUser, strPassword, oService) then
  479. set oPrinter = oService.Get("Win32_Printer='" & strPrinter & "'")
  480. else
  481. SetPrinter = kErrorFailure
  482. exit function
  483. end if
  484. '
  485. ' Check if Get was successful
  486. '
  487. if Err.Number = kErrorSuccess then
  488. if oParamdict.Exists(kPortName) then oPrinter.PortName = oParamDict.Item(kPortName) end if
  489. if oParamdict.Exists(kDriverName) then oPrinter.DriverName = oParamDict.Item(kDriverName) end if
  490. if oParamdict.Exists(kShareName) then oPrinter.ShareName = oParamDict.Item(kShareName) end if
  491. if oParamdict.Exists(kLocation) then oPrinter.Location = oParamDict.Item(kLocation) end if
  492. if oParamdict.Exists(kComment) then oPrinter.Comment = oParamDict.Item(kComment) end if
  493. if oParamdict.Exists(kDataType) then oPrinter.PrintJobDataType = oParamDict.Item(kDataType) end if
  494. if oParamdict.Exists(kSepFile) then oPrinter.SeparatorFile = oParamDict.Item(kSepfile) end if
  495. if oParamdict.Exists(kParameters) then oPrinter.Parameters = oParamDict.Item(kParameters) end if
  496. if oParamdict.Exists(kPriority) then oPrinter.Priority = oParamDict.Item(kPriority) end if
  497. if oParamdict.Exists(kDefaultPriority) then oPrinter.DefaultPriority = oParamDict.Item(kDefaultPriority) end if
  498. if oParamdict.Exists(kPrintProc) then oPrinter.PrintProc = oParamDict.Item(kPrintProc) end if
  499. if oParamdict.Exists(kStartTime) then oPrinter.StartTime = oParamDict.Item(kStartTime) end if
  500. if oParamdict.Exists(kUntilTime) then oPrinter.UntilTime = oParamDict.Item(kUntilTime) end if
  501. if oParamdict.Exists(kQueued) then oPrinter.Queued = oParamDict.Item(kQueued) end if
  502. if oParamdict.Exists(kDirect) then oPrinter.Direct = oParamDict.Item(kDirect) end if
  503. if oParamdict.Exists(kShared) then oPrinter.Shared = oParamDict.Item(kShared) end if
  504. if oParamdict.Exists(kHidden) then oPrinter.Hidden = oParamDict.Item(kHidden) end if
  505. if oParamdict.Exists(kEnabledevq) then oPrinter.EnableDevQueryPrint = oParamDict.Item(kEnabledevq) end if
  506. if oParamdict.Exists(kKeepPrintedJobs) then oPrinter.KeepPrintedJobs = oParamDict.Item(kKeepPrintedJobs) end if
  507. if oParamdict.Exists(kDoCompleteFirst) then oPrinter.DoCompleteFirst = oParamDict.Item(kDoCompleteFirst) end if
  508. if oParamdict.Exists(kWorkOffline) then oPrinter.WorkOffline = oParamDict.Item(kWorkOffline) end if
  509. if oParamdict.Exists(kEnableBidi) then oPrinter.EnableBidi = oParamDict.Item(kEnableBidi) end if
  510. if oParamdict.Exists(kRawonly) then oPrinter.RawOnly = oParamDict.Item(kRawonly) end if
  511. if oParamdict.Exists(kPublished) then oPrinter.Published = oParamDict.Item(kPublished) end if
  512. oPrinter.Put_(kFlagUpdateOnly)
  513. if Err.Number = kErrorSuccess then
  514. wscript.echo L_Text_Msg_General06_Text & L_Space_Text & strPrinter
  515. iRetval = kErrorSuccess
  516. else
  517. wscript.echo L_Text_Msg_General07_Text & L_Space_Text & strPrinter & L_Space_Text _
  518. & L_Error_Text & L_Space_Text & L_Hex_Text & hex(Err.Number) & L_Space_Text _
  519. & Err.Description
  520. '
  521. ' Try getting extended error information
  522. '
  523. call LastError()
  524. end if
  525. else
  526. wscript.echo L_Text_Msg_General04_Text & L_Space_Text & strPrinter & L_Space_Text _
  527. & L_Error_Text & L_Space_Text & L_Hex_Text & hex(Err.Number) & L_Space_Text _
  528. & Err.Description
  529. '
  530. ' Try getting extended error information
  531. '
  532. call LastError()
  533. end if
  534. SetPrinter = iRetval
  535. end function
  536. '
  537. ' Converts the printer status to a string
  538. '
  539. function PrnStatusToString(Status)
  540. dim str
  541. str = L_Empty_Text
  542. select case Status
  543. case 1
  544. str = str + L_Text_Msg_Status01_Text + L_Space_Text
  545. case 2
  546. str = str + L_Text_Msg_Status02_Text + L_Space_Text
  547. case 3
  548. str = str + L_Text_Msg_Status03_Text + L_Space_Text
  549. case 4
  550. str = str + L_Text_Msg_Status04_Text + L_Space_Text
  551. case 5
  552. str = str + L_Text_Msg_Status05_Text + L_Space_Text
  553. case 6
  554. str = str + L_Text_Msg_Status06_Text + L_Space_Text
  555. case 7
  556. str = str + L_Text_Msg_Status07_Text + L_Space_Text
  557. end select
  558. PrnStatusToString = str
  559. end function
  560. '
  561. ' Converts the extended printer status to a string
  562. '
  563. function ExtPrnStatusToString(Status)
  564. dim str
  565. str = L_Empty_Text
  566. select case Status
  567. case 1
  568. str = str + L_Text_Msg_Status01_Text + L_Space_Text
  569. case 2
  570. str = str + L_Text_Msg_Status02_Text + L_Space_Text
  571. case 3
  572. str = str + L_Text_Msg_Status03_Text + L_Space_Text
  573. case 4
  574. str = str + L_Text_Msg_Status04_Text + L_Space_Text
  575. case 5
  576. str = str + L_Text_Msg_Status05_Text + L_Space_Text
  577. case 6
  578. str = str + L_Text_Msg_Status06_Text + L_Space_Text
  579. case 7
  580. str = str + L_Text_Msg_Status07_Text + L_Space_Text
  581. case 8
  582. str = str + L_Text_Msg_Status08_Text + L_Space_Text
  583. case 9
  584. str = str + L_Text_Msg_Status09_Text + L_Space_Text
  585. case 10
  586. str = str + L_Text_Msg_Status10_Text + L_Space_Text
  587. case 11
  588. str = str + L_Text_Msg_Status11_Text + L_Space_Text
  589. case 12
  590. str = str + L_Text_Msg_Status12_Text + L_Space_Text
  591. case 13
  592. str = str + L_Text_Msg_Status13_Text + L_Space_Text
  593. case 14
  594. str = str + L_Text_Msg_Status14_Text + L_Space_Text
  595. case 15
  596. str = str + L_Text_Msg_Status15_Text + L_Space_Text
  597. case 16
  598. str = str + L_Text_Msg_Status16_Text + L_Space_Text
  599. case 17
  600. str = str + L_Text_Msg_Status17_Text + L_Space_Text
  601. case 18
  602. str = str + L_Text_Msg_Status18_Text + L_Space_Text
  603. end select
  604. ExtPrnStatusToString = str
  605. end function
  606. '
  607. ' Converts the detected error state to a string
  608. '
  609. function DetectedErrorStateToString(Status)
  610. dim str
  611. str = L_Empty_Text
  612. select case Status
  613. case 0
  614. str = str + L_Text_Msg_Status02_Text + L_Space_Text
  615. case 1
  616. str = str + L_Text_Msg_Status01_Text + L_Space_Text
  617. case 2
  618. str = str + L_Text_Msg_Status01_Text + L_Space_Text
  619. case 3
  620. str = str + L_Text_Msg_Status20_Text + L_Space_Text
  621. case 4
  622. str = str + L_Text_Msg_Status21_Text + L_Space_Text
  623. case 5
  624. str = str + L_Text_Msg_Status22_Text + L_Space_Text
  625. case 6
  626. str = str + L_Text_Msg_Status23_Text + L_Space_Text
  627. case 7
  628. str = str + L_Text_Msg_Status24_Text + L_Space_Text
  629. case 8
  630. str = str + L_Text_Msg_Status25_Text + L_Space_Text
  631. case 9
  632. str = str + L_Text_Msg_Status07_Text + L_Space_Text
  633. case 10
  634. str = str + L_Text_Msg_Status26_Text + L_Space_Text
  635. case 11
  636. str = str + L_Text_Msg_Status27_Text + L_Space_Text
  637. end select
  638. DetectedErrorStateToString = str
  639. end function
  640. '
  641. ' Converts the extended detected error state to a string
  642. '
  643. function ExtDetectedErrorStateToString(Status)
  644. dim str
  645. str = L_Empty_Text
  646. select case Status
  647. case 0
  648. str = str + L_Text_Msg_Status02_Text + L_Space_Text
  649. case 1
  650. str = str + L_Text_Msg_Status01_Text + L_Space_Text
  651. case 2
  652. str = str + L_Text_Msg_Status01_Text + L_Space_Text
  653. case 3
  654. str = str + L_Text_Msg_Status20_Text + L_Space_Text
  655. case 4
  656. str = str + L_Text_Msg_Status21_Text + L_Space_Text
  657. case 5
  658. str = str + L_Text_Msg_Status22_Text + L_Space_Text
  659. case 6
  660. str = str + L_Text_Msg_Status23_Text + L_Space_Text
  661. case 7
  662. str = str + L_Text_Msg_Status24_Text + L_Space_Text
  663. case 8
  664. str = str + L_Text_Msg_Status25_Text + L_Space_Text
  665. case 9
  666. str = str + L_Text_Msg_Status07_Text + L_Space_Text
  667. case 10
  668. str = str + L_Text_Msg_Status26_Text + L_Space_Text
  669. case 11
  670. str = str + L_Text_Msg_Status27_Text + L_Space_Text
  671. case 12
  672. str = str + L_Text_Msg_Status28_Text + L_Space_Text
  673. case 13
  674. str = str + L_Text_Msg_Status29_Text + L_Space_Text
  675. case 14
  676. str = str + L_Text_Msg_Status30_Text + L_Space_Text
  677. case 15
  678. str = str + L_Text_Msg_Status31_Text + L_Space_Text
  679. case 16
  680. str = str + L_Text_Msg_Status32_Text + L_Space_Text
  681. end select
  682. ExtDetectedErrorStateToString = str
  683. end function
  684. '
  685. ' Debug display helper function
  686. '
  687. sub DebugPrint(uFlags, strString)
  688. if gDebugFlag = true then
  689. if uFlags = kDebugTrace then
  690. wscript.echo L_Debug_Text & L_Space_Text & strString
  691. end if
  692. if uFlags = kDebugError then
  693. if Err <> 0 then
  694. wscript.echo L_Debug_Text & L_Space_Text & strString & L_Space_Text _
  695. & L_Error_Text & L_Space_Text & L_Hex_Text & hex(Err.Number) _
  696. & L_Space_Text & Err.Description
  697. end if
  698. end if
  699. end if
  700. end sub
  701. '
  702. ' Parse the command line into its components
  703. '
  704. function ParseCommandLine(iAction, oParamdict)
  705. on error resume next
  706. DebugPrint kDebugTrace, L_Text_Dbg_Msg05_Text
  707. dim oArgs
  708. dim iIndex
  709. iAction = kActionUnknown
  710. iIndex = 0
  711. set oArgs = wscript.Arguments
  712. while iIndex < oArgs.Count
  713. select case oArgs(iIndex)
  714. case "-g"
  715. iAction = kActionGet
  716. case "-t"
  717. iAction = kActionSet
  718. case "-x"
  719. iAction = kActionRename
  720. case "-p"
  721. iIndex = iIndex + 1
  722. oParamdict.Add kPrinterName, oArgs(iIndex)
  723. case "-s"
  724. iIndex = iIndex + 1
  725. oParamdict.Add kServerName, RemoveBackslashes(oArgs(iIndex))
  726. case "-r"
  727. iIndex = iIndex + 1
  728. oParamdict.Add kPortName, oArgs(iIndex)
  729. case "-h"
  730. iIndex = iIndex + 1
  731. oParamdict.Add kShareName, oArgs(iIndex)
  732. case "-m"
  733. iIndex = iIndex + 1
  734. oParamdict.Add kComment, oArgs(iIndex)
  735. case "-l"
  736. iIndex = iIndex + 1
  737. oParamdict.Add kLocation, oArgs(iIndex)
  738. case "-y"
  739. iIndex = iIndex + 1
  740. oParamdict.Add kDataType, oArgs(iIndex)
  741. case "-f"
  742. iIndex = iIndex + 1
  743. oParamdict.Add kSepFile, oArgs(iIndex)
  744. case "-z"
  745. iIndex = iIndex + 1
  746. oParamdict.Add kNewPrinterName, oArgs(iIndex)
  747. case "-u"
  748. iIndex = iIndex + 1
  749. oParamdict.Add kUserName, oArgs(iIndex)
  750. case "-w"
  751. iIndex = iIndex + 1
  752. oParamdict.Add kPassword, oArgs(iIndex)
  753. case "-st"
  754. iIndex = iIndex + 1
  755. oParamdict.Add kStartTime, "********" & oArgs(iIndex) & "00.000000+000"
  756. case "-o"
  757. iIndex = iIndex + 1
  758. oParamdict.Add kPriority, oArgs(iIndex)
  759. case "-i"
  760. iIndex = iIndex + 1
  761. oParamdict.Add kDefaultPriority, oArgs(iIndex)
  762. case "-ut"
  763. iIndex = iIndex + 1
  764. oParamdict.Add kUntilTime, "********" & oArgs(iIndex) & "00.000000+000"
  765. case "-queued"
  766. oParamdict.Add kQueued, false
  767. case "+queued"
  768. oParamdict.Add kQueued, true
  769. case "-direct"
  770. oParamdict.Add kDirect, false
  771. case "+direct"
  772. oParamdict.Add kDirect, true
  773. case "-shared"
  774. oParamdict.Add kShared, false
  775. case "+shared"
  776. oParamdict.Add kShared, true
  777. case "-hidden"
  778. oParamdict.Add kHidden, false
  779. case "+hidden"
  780. oParamdict.Add kHidden, true
  781. case "-enabledevq"
  782. oParamdict.Add kEnabledevq, false
  783. case "+enabledevq"
  784. oParamdict.Add kEnabledevq, true
  785. case "-keepprintedjobs"
  786. oParamdict.Add kKeepprintedjobs, false
  787. case "+keepprintedjobs"
  788. oParamdict.Add kKeepprintedjobs, true
  789. case "-docompletefirst"
  790. oParamdict.Add kDocompletefirst, false
  791. case "+docompletefirst"
  792. oParamdict.Add kDocompletefirst, true
  793. case "-workoffline"
  794. oParamdict.Add kWorkoffline, false
  795. case "+workoffline"
  796. oParamdict.Add kWorkoffline, true
  797. case "-enablebidi"
  798. oParamdict.Add kEnablebidi, false
  799. case "+enablebidi"
  800. oParamdict.Add kEnablebidi, true
  801. case "-rawonly"
  802. oParamdict.Add kRawonly, false
  803. case "+rawonly"
  804. oParamdict.Add kRawonly, true
  805. case "-published"
  806. oParamdict.Add kPublished, false
  807. case "+published"
  808. oParamdict.Add kPublished, true
  809. case "-?"
  810. Usage(true)
  811. exit function
  812. case else
  813. Usage(true)
  814. exit function
  815. end select
  816. iIndex = iIndex + 1
  817. wend
  818. if Err = kErrorSuccess then
  819. ParseCommandLine = kErrorSuccess
  820. else
  821. wscript.echo L_Text_Error_General02_Text & L_Space_Text & L_Error_Text & L_Space_Text _
  822. & L_Hex_Text & hex(Err.Number) & L_Space_text & Err.Description
  823. ParseCommandLine = kErrorFailure
  824. end if
  825. end function
  826. '
  827. ' Display command usage.
  828. '
  829. sub Usage(bExit)
  830. wscript.echo L_Help_Help_General01_Text
  831. wscript.echo L_Help_Help_General02_Text
  832. wscript.echo L_Help_Help_General03_Text
  833. wscript.echo L_Help_Help_General04_Text
  834. wscript.echo L_Help_Help_General05_Text
  835. wscript.echo L_Help_Help_General06_Text
  836. wscript.echo L_Help_Help_General07_Text
  837. wscript.echo L_Help_Help_General08_Text
  838. wscript.echo L_Help_Help_General09_Text
  839. wscript.echo L_Help_Help_General10_Text
  840. wscript.echo L_Help_Help_General11_Text
  841. wscript.echo L_Help_Help_General12_Text
  842. wscript.echo L_Help_Help_General13_Text
  843. wscript.echo L_Help_Help_General14_Text
  844. wscript.echo L_Help_Help_General15_Text
  845. wscript.echo L_Help_Help_General16_Text
  846. wscript.echo L_Help_Help_General17_Text
  847. wscript.echo L_Help_Help_General18_Text
  848. wscript.echo L_Help_Help_General19_Text
  849. wscript.echo L_Help_Help_General20_Text
  850. wscript.echo L_Help_Help_General21_Text
  851. wscript.echo L_Help_Help_General22_Text
  852. wscript.echo L_Help_Help_General23_Text
  853. wscript.echo L_Help_Help_General24_Text
  854. wscript.echo L_Help_Help_General25_Text
  855. wscript.echo L_Help_Help_General26_Text
  856. wscript.echo L_Help_Help_General27_Text
  857. wscript.echo L_Empty_Text
  858. wscript.echo L_Help_Help_General28_Text
  859. wscript.echo L_Help_Help_General29_Text
  860. wscript.echo L_Help_Help_General30_Text
  861. wscript.echo L_Help_Help_General31_Text
  862. wscript.echo L_Help_Help_General32_Text
  863. wscript.echo L_Help_Help_General33_Text
  864. wscript.echo L_Help_Help_General34_Text
  865. wscript.echo L_Help_Help_General35_Text
  866. if bExit then
  867. wscript.quit(1)
  868. end if
  869. end sub
  870. '
  871. ' Determines which program is being used to run this script.
  872. ' Returns true if the script host is cscript.exe
  873. '
  874. function IsHostCscript()
  875. on error resume next
  876. dim strFullName
  877. dim strCommand
  878. dim i, j
  879. dim bReturn
  880. bReturn = false
  881. strFullName = WScript.FullName
  882. i = InStr(1, strFullName, ".exe", 1)
  883. if i <> 0 then
  884. j = InStrRev(strFullName, "\", i, 1)
  885. if j <> 0 then
  886. strCommand = Mid(strFullName, j+1, i-j-1)
  887. if LCase(strCommand) = "cscript" then
  888. bReturn = true
  889. end if
  890. end if
  891. end if
  892. if Err <> 0 then
  893. wscript.echo L_Text_Error_General01_Text & L_Space_Text & L_Error_Text & L_Space_Text _
  894. & L_Hex_Text & hex(Err.Number) & L_Space_Text & Err.Description
  895. end if
  896. IsHostCscript = bReturn
  897. end function
  898. '
  899. ' Retrieves extended information about the last error that occurred
  900. ' during a WBEM operation. The methods that set an SWbemLastError
  901. ' object are GetObject, PutInstance, DeleteInstance
  902. '
  903. sub LastError()
  904. on error resume next
  905. dim oError
  906. set oError = CreateObject("WbemScripting.SWbemLastError")
  907. if Err = kErrorSuccess then
  908. wscript.echo L_Operation_Text & L_Space_Text & oError.Operation
  909. wscript.echo L_Provider_Text & L_Space_Text & oError.ProviderName
  910. wscript.echo L_Description_Text & L_Space_Text & oError.Description
  911. wscript.echo L_Text_Error_General03_Text & L_Space_Text & oError.StatusCode
  912. end if
  913. end sub
  914. '
  915. ' Connects to the WMI service on a server. oService is returned as a service
  916. ' object (SWbemServices)
  917. '
  918. function WmiConnect(strServer, strNameSpace, strUser, strPassword, oService)
  919. on error resume next
  920. dim oLocator
  921. dim bResult
  922. oService = null
  923. bResult = false
  924. set oLocator = CreateObject("WbemScripting.SWbemLocator")
  925. if Err = kErrorSuccess then
  926. set oService = oLocator.ConnectServer(strServer, strNameSpace, strUser, strPassword)
  927. if Err = kErrorSuccess then
  928. bResult = true
  929. oService.Security_.impersonationlevel = 3
  930. '
  931. ' Required to perform administrative tasks on the spooler service
  932. '
  933. oService.Security_.Privileges.AddAsString "SeLoadDriverPrivilege"
  934. Err.Clear
  935. else
  936. wscript.echo L_Text_Msg_General08_Text & L_Space_Text & L_Error_Text _
  937. & L_Space_Text & L_Hex_Text & hex(Err.Number) & L_Space_Text _
  938. & Err.Description
  939. end if
  940. else
  941. wscript.echo L_Text_Msg_General09_Text & L_Space_Text & L_Error_Text _
  942. & L_Space_Text & L_Hex_Text & hex(Err.Number) & L_Space_Text _
  943. & Err.Description
  944. end if
  945. WmiConnect = bResult
  946. end function
  947. '
  948. ' Remove leading "\\" from server name
  949. '
  950. function RemoveBackslashes(strServer)
  951. dim strRet
  952. strRet = strServer
  953. if Left(strServer, 2) = "\\" and Len(strServer) > 2 then
  954. strRet = Mid(strServer, 3)
  955. end if
  956. RemoveBackslashes = strRet
  957. end function
  958. '' SIG '' Begin signature block
  959. '' SIG '' MIIZMAYJKoZIhvcNAQcCoIIZITCCGR0CAQExDjAMBggq
  960. '' SIG '' hkiG9w0CBQUAMGYGCisGAQQBgjcCAQSgWDBWMDIGCisG
  961. '' SIG '' AQQBgjcCAR4wJAIBAQQQTvApFpkntU2P5azhDxfrqwIB
  962. '' SIG '' AAIBAAIBAAIBAAIBADAgMAwGCCqGSIb3DQIFBQAEEOLm
  963. '' SIG '' 4j+9BLdGEED7+fyvFSygghQ4MIICvDCCAiUCEEoZ0jiM
  964. '' SIG '' glkcpV1zXxVd3KMwDQYJKoZIhvcNAQEEBQAwgZ4xHzAd
  965. '' SIG '' BgNVBAoTFlZlcmlTaWduIFRydXN0IE5ldHdvcmsxFzAV
  966. '' SIG '' BgNVBAsTDlZlcmlTaWduLCBJbmMuMSwwKgYDVQQLEyNW
  967. '' SIG '' ZXJpU2lnbiBUaW1lIFN0YW1waW5nIFNlcnZpY2UgUm9v
  968. '' SIG '' dDE0MDIGA1UECxMrTk8gTElBQklMSVRZIEFDQ0VQVEVE
  969. '' SIG '' LCAoYyk5NyBWZXJpU2lnbiwgSW5jLjAeFw05NzA1MTIw
  970. '' SIG '' MDAwMDBaFw0wNDAxMDcyMzU5NTlaMIGeMR8wHQYDVQQK
  971. '' SIG '' ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMRcwFQYDVQQL
  972. '' SIG '' Ew5WZXJpU2lnbiwgSW5jLjEsMCoGA1UECxMjVmVyaVNp
  973. '' SIG '' Z24gVGltZSBTdGFtcGluZyBTZXJ2aWNlIFJvb3QxNDAy
  974. '' SIG '' BgNVBAsTK05PIExJQUJJTElUWSBBQ0NFUFRFRCwgKGMp
  975. '' SIG '' OTcgVmVyaVNpZ24sIEluYy4wgZ8wDQYJKoZIhvcNAQEB
  976. '' SIG '' BQADgY0AMIGJAoGBANMuIPBofCwtLoEcsQaypwu3EQ1X
  977. '' SIG '' 2lPYdePJMyqy1PYJWzTz6ZD+CQzQ2xtauc3n9oixncCH
  978. '' SIG '' Jet9WBBzanjLcRX9xlj2KatYXpYE/S1iEViBHMpxlNUi
  979. '' SIG '' WC/VzBQFhDa6lKq0TUrp7jsirVaZfiGcbIbASkeXarSm
  980. '' SIG '' NtX8CS3TtDmbAgMBAAEwDQYJKoZIhvcNAQEEBQADgYEA
  981. '' SIG '' YVUOPnvHkhJ+ERCOIszUsxMrW+hE5At4nqR+86cHch7i
  982. '' SIG '' We/MhOOJlEzbTmHvs6T7Rj1QNAufcFb2jip/F87lY795
  983. '' SIG '' aQdzLrCVKIr17aqp0l3NCsoQCY/Os68olsR5KYSS3P+6
  984. '' SIG '' Z0JIppAQ5L9h+JxT5ZPRcz/4/Z1PhKxV0f0RY2MwggQC
  985. '' SIG '' MIIDa6ADAgECAhAIem1cb2KTT7rE/UPhFBidMA0GCSqG
  986. '' SIG '' SIb3DQEBBAUAMIGeMR8wHQYDVQQKExZWZXJpU2lnbiBU
  987. '' SIG '' cnVzdCBOZXR3b3JrMRcwFQYDVQQLEw5WZXJpU2lnbiwg
  988. '' SIG '' SW5jLjEsMCoGA1UECxMjVmVyaVNpZ24gVGltZSBTdGFt
  989. '' SIG '' cGluZyBTZXJ2aWNlIFJvb3QxNDAyBgNVBAsTK05PIExJ
  990. '' SIG '' QUJJTElUWSBBQ0NFUFRFRCwgKGMpOTcgVmVyaVNpZ24s
  991. '' SIG '' IEluYy4wHhcNMDEwMjI4MDAwMDAwWhcNMDQwMTA2MjM1
  992. '' SIG '' OTU5WjCBoDEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4x
  993. '' SIG '' HzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdvcmsx
  994. '' SIG '' OzA5BgNVBAsTMlRlcm1zIG9mIHVzZSBhdCBodHRwczov
  995. '' SIG '' L3d3dy52ZXJpc2lnbi5jb20vcnBhIChjKTAxMScwJQYD
  996. '' SIG '' VQQDEx5WZXJpU2lnbiBUaW1lIFN0YW1waW5nIFNlcnZp
  997. '' SIG '' Y2UwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
  998. '' SIG '' AQDAemGH67KnA2MbKxph3oC3FR2gi5A9uyeShBQ564XO
  999. '' SIG '' KZIGZkikA0+N6E+n8K9e0S8Zx5HxtZ57kSHO6f/jTvD8
  1000. '' SIG '' r5VYuGMt5o72KRjNcI5Qw+2Wu0DbviXoQlXW9oXyBueL
  1001. '' SIG '' mRwx8wMP1EycJCrcGxuPgvOw76dN4xSn4I/Wx2jCYVip
  1002. '' SIG '' ctT4MEhP2S9vYyDZicqCe8JLvCjFgWjn5oJArEY6oPk/
  1003. '' SIG '' Ns1Mu1RCWnple/6E5MdHVKy5PeyAxxr3xDOBgckqlft/
  1004. '' SIG '' XjqHkBTbzC518u9r5j2pYL5CAapPqluoPyIxnxIV+XOh
  1005. '' SIG '' HoKLBCvqRgJMbY8fUC6VSyp4BoR0PZGPLEcxAgMBAAGj
  1006. '' SIG '' gbgwgbUwQAYIKwYBBQUHAQEENDAyMDAGCCsGAQUFBzAB
  1007. '' SIG '' hiRodHRwOi8vb2NzcC52ZXJpc2lnbi5jb20vb2NzcC9z
  1008. '' SIG '' dGF0dXMwCQYDVR0TBAIwADBEBgNVHSAEPTA7MDkGC2CG
  1009. '' SIG '' SAGG+EUBBwEBMCowKAYIKwYBBQUHAgEWHGh0dHBzOi8v
  1010. '' SIG '' d3d3LnZlcmlzaWduLmNvbS9ycGEwEwYDVR0lBAwwCgYI
  1011. '' SIG '' KwYBBQUHAwgwCwYDVR0PBAQDAgbAMA0GCSqGSIb3DQEB
  1012. '' SIG '' BAUAA4GBAC3zT2NgLBja9SQPUrMM67O8Z4XCI+2PRg3P
  1013. '' SIG '' Gk2+83x6IDAyGGiLkrsymfCTuDsVBid7PgIGAKQhkoQT
  1014. '' SIG '' CsWY5UBXxQUl6K+vEWqp5TvL6SP2lCldQFXzpVOdyDY6
  1015. '' SIG '' OWUIc3OkMtKvrL/HBTz/RezD6Nok0c5jrgmn++Ib4/1B
  1016. '' SIG '' CmqWMIIEEjCCAvqgAwIBAgIPAMEAizw8iBHRPvZj7N9A
  1017. '' SIG '' MA0GCSqGSIb3DQEBBAUAMHAxKzApBgNVBAsTIkNvcHly
  1018. '' SIG '' aWdodCAoYykgMTk5NyBNaWNyb3NvZnQgQ29ycC4xHjAc
  1019. '' SIG '' BgNVBAsTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEhMB8G
  1020. '' SIG '' A1UEAxMYTWljcm9zb2Z0IFJvb3QgQXV0aG9yaXR5MB4X
  1021. '' SIG '' DTk3MDExMDA3MDAwMFoXDTIwMTIzMTA3MDAwMFowcDEr
  1022. '' SIG '' MCkGA1UECxMiQ29weXJpZ2h0IChjKSAxOTk3IE1pY3Jv
  1023. '' SIG '' c29mdCBDb3JwLjEeMBwGA1UECxMVTWljcm9zb2Z0IENv
  1024. '' SIG '' cnBvcmF0aW9uMSEwHwYDVQQDExhNaWNyb3NvZnQgUm9v
  1025. '' SIG '' dCBBdXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IB
  1026. '' SIG '' DwAwggEKAoIBAQCpAr3BcOY78k4bKJ+XeF4w6qKpjSVf
  1027. '' SIG '' +P6VTKO3/p2iID58UaKboo9gMmvRQmR57qx2yVTa8uuc
  1028. '' SIG '' hhyPn4Rms8VremIj1h083g8BkuiWxL8tZpqaaCaZ0Dos
  1029. '' SIG '' vwy1WCbBRucKPjiWLKkoOajsSYNC44QPu5psVWGsgnyh
  1030. '' SIG '' YC13TOmZtGQ7mlAcMQgkFJ+p55ErGOY9mGMUYFgFZZ8d
  1031. '' SIG '' N1KH96fvlALGG9O/VUWziYC/OuxUlE6u/ad6bXROrxjM
  1032. '' SIG '' lgkoIQBXkGBpN7tLEgc8Vv9b+6RmCgim0oFWV++2O14W
  1033. '' SIG '' gXcE2va+roCV/rDNf9anGnJcPMq88AijIjCzBoXJsyB3
  1034. '' SIG '' E4XfAgMBAAGjgagwgaUwgaIGA1UdAQSBmjCBl4AQW9Bw
  1035. '' SIG '' 72lyniNRfhSyTY7/y6FyMHAxKzApBgNVBAsTIkNvcHly
  1036. '' SIG '' aWdodCAoYykgMTk5NyBNaWNyb3NvZnQgQ29ycC4xHjAc
  1037. '' SIG '' BgNVBAsTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEhMB8G
  1038. '' SIG '' A1UEAxMYTWljcm9zb2Z0IFJvb3QgQXV0aG9yaXR5gg8A
  1039. '' SIG '' wQCLPDyIEdE+9mPs30AwDQYJKoZIhvcNAQEEBQADggEB
  1040. '' SIG '' AJXoC8CN85cYNe24ASTYdxHzXGAyn54Lyz4FkYiPyTrm
  1041. '' SIG '' IfLwV5MstaBHyGLv/NfMOztaqTZUaf4kbT/JzKreBXzd
  1042. '' SIG '' MY09nxBwarv+Ek8YacD80EPjEVogT+pie6+qGcgrNyUt
  1043. '' SIG '' vmWhEoolD2Oj91Qc+SHJ1hXzUqxuQzIH/YIX+OVnbA1R
  1044. '' SIG '' 9r3xUse958Qw/CAxCYgdlSkaTdUdAqXxgOADtFv0sd3I
  1045. '' SIG '' V+5lScdSVLa0AygS/5DW8AiPfriXxas3LOR65Kh343ag
  1046. '' SIG '' ANBqP8HSNorgQRKoNWobats14dQcBOSoRQTIWjM4bk0c
  1047. '' SIG '' DWK3CqKM09VUP0bNHFWmcNsSOoeTdZ+n0qAwggSLMIID
  1048. '' SIG '' c6ADAgECAgphBiqNAAAAAAALMA0GCSqGSIb3DQEBBQUA
  1049. '' SIG '' MIGmMQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGlu
  1050. '' SIG '' Z3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMV
  1051. '' SIG '' TWljcm9zb2Z0IENvcnBvcmF0aW9uMSswKQYDVQQLEyJD
  1052. '' SIG '' b3B5cmlnaHQgKGMpIDIwMDAgTWljcm9zb2Z0IENvcnAu
  1053. '' SIG '' MSMwIQYDVQQDExpNaWNyb3NvZnQgQ29kZSBTaWduaW5n
  1054. '' SIG '' IFBDQTAeFw0wMTAzMjkyMTI3MjZaFw0wMjA1MjkyMTM3
  1055. '' SIG '' MjZaMIGhMQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2Fz
  1056. '' SIG '' aGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UE
  1057. '' SIG '' ChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSswKQYDVQQL
  1058. '' SIG '' EyJDb3B5cmlnaHQgKGMpIDIwMDEgTWljcm9zb2Z0IENv
  1059. '' SIG '' cnAuMR4wHAYDVQQDExVNaWNyb3NvZnQgQ29ycG9yYXRp
  1060. '' SIG '' b24wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAI4W
  1061. '' SIG '' b9oX0+NFlbKs0+XPMT0dxIe7TkgF+YtWqSuHY8hE2jDJ
  1062. '' SIG '' FLzreBq6xOricgBMRmab3mJGbp73RLrous/C1fU7lke4
  1063. '' SIG '' UV7Rd2cie1MqLeoij3xO/wK1GzOg6pXrGLp2+WHSAAuU
  1064. '' SIG '' YDQ7SYYss9mOky4ta/3jVaq4qm7gcPSiYAYvAgMBAAGj
  1065. '' SIG '' ggFAMIIBPDAOBgNVHQ8BAf8EBAMCBsAwEwYDVR0lBAww
  1066. '' SIG '' CgYIKwYBBQUHAwMwHQYDVR0OBBYEFO+QQN5P4BuzRdgH
  1067. '' SIG '' A3uZ+XUZZjUaMIGpBgNVHSMEgaEwgZ6AFClcuRu2zTPu
  1068. '' SIG '' u55Zffflyi7EDTQooXSkcjBwMSswKQYDVQQLEyJDb3B5
  1069. '' SIG '' cmlnaHQgKGMpIDE5OTcgTWljcm9zb2Z0IENvcnAuMR4w
  1070. '' SIG '' HAYDVQQLExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xITAf
  1071. '' SIG '' BgNVBAMTGE1pY3Jvc29mdCBSb290IEF1dGhvcml0eYIQ
  1072. '' SIG '' aguZT8AA3qoR1NhAmqi+5jBKBgNVHR8EQzBBMD+gPaA7
  1073. '' SIG '' hjlodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpL2Ny
  1074. '' SIG '' bC9wcm9kdWN0cy9Db2RlU2lnblBDQS5jcmwwDQYJKoZI
  1075. '' SIG '' hvcNAQEFBQADggEBAARnzM/dcU1Hwo6DaRJrol+WJgfo
  1076. '' SIG '' j9jTnlrbJ2kdHfQ8VShT3REkJ5KuWVZA6cRNnezbq36U
  1077. '' SIG '' mz0gLDXyJ07AyDm3ZWPRNWbaU71BfllKpFK39f3IvaF7
  1078. '' SIG '' BriY2Jju0Qs0dWYN3EGPw7CShFfBQnqFxpET21St3n5B
  1079. '' SIG '' 3CCv6RvJwjIxxY3py/qDS8FYkzLE1+PNeqvffQicxoU7
  1080. '' SIG '' 6EGBOLF4Gbw4981rws6qTJAdg8bmAYloqueP6AdQKjLd
  1081. '' SIG '' 18+9zHrZOg//skSKV8gaN2QHF317cktGBqEoWyNXHmr9
  1082. '' SIG '' kSIzQNF1SxIBbgYhhDZvqCoMfz6uNSv2t30LCBPlV/NL
  1083. '' SIG '' rY8gv7gwggTJMIIDsaADAgECAhBqC5lPwADeqhHU2ECa
  1084. '' SIG '' qL7mMA0GCSqGSIb3DQEBBAUAMHAxKzApBgNVBAsTIkNv
  1085. '' SIG '' cHlyaWdodCAoYykgMTk5NyBNaWNyb3NvZnQgQ29ycC4x
  1086. '' SIG '' HjAcBgNVBAsTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEh
  1087. '' SIG '' MB8GA1UEAxMYTWljcm9zb2Z0IFJvb3QgQXV0aG9yaXR5
  1088. '' SIG '' MB4XDTAwMTIxMDA4MDAwMFoXDTA1MTExMjA4MDAwMFow
  1089. '' SIG '' gaYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5n
  1090. '' SIG '' dG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVN
  1091. '' SIG '' aWNyb3NvZnQgQ29ycG9yYXRpb24xKzApBgNVBAsTIkNv
  1092. '' SIG '' cHlyaWdodCAoYykgMjAwMCBNaWNyb3NvZnQgQ29ycC4x
  1093. '' SIG '' IzAhBgNVBAMTGk1pY3Jvc29mdCBDb2RlIFNpZ25pbmcg
  1094. '' SIG '' UENBMIIBIDANBgkqhkiG9w0BAQEFAAOCAQ0AMIIBCAKC
  1095. '' SIG '' AQEAooQVU9gLMA40lf86G8LzL3ttNyNN89KM5f2v/cUC
  1096. '' SIG '' NB8kx+Wh3FTsfgJ0R6vbMlgWFFEpOPF+srSMOke1OU5u
  1097. '' SIG '' VMIxDDpt+83Ny1CcG66n2NlKJj+1xcuPluJJ8m3Y6ZY+
  1098. '' SIG '' 3gXP8KZVN60vYM2AYUKhSVRKDxi3S9mTmTBaR3VktNO7
  1099. '' SIG '' 3barDJ1PuHM7GDqqtIeMsIiwTU8fThG1M4DfDTpkb0TH
  1100. '' SIG '' NL1Kk5u8ph35BSNOYCmPzCryhJqZrajbCnB71jRBkKW3
  1101. '' SIG '' ZsdcGx2jMw6bVAMaP5iQuMznPQR0QxyP9znms6xIemsq
  1102. '' SIG '' DmIBYTl2bv0+mAdLFPEBRv0VAOBH2k/kBeSAJQIBA6OC
  1103. '' SIG '' ASgwggEkMBMGA1UdJQQMMAoGCCsGAQUFBwMDMIGiBgNV
  1104. '' SIG '' HQEEgZowgZeAEFvQcO9pcp4jUX4Usk2O/8uhcjBwMSsw
  1105. '' SIG '' KQYDVQQLEyJDb3B5cmlnaHQgKGMpIDE5OTcgTWljcm9z
  1106. '' SIG '' b2Z0IENvcnAuMR4wHAYDVQQLExVNaWNyb3NvZnQgQ29y
  1107. '' SIG '' cG9yYXRpb24xITAfBgNVBAMTGE1pY3Jvc29mdCBSb290
  1108. '' SIG '' IEF1dGhvcml0eYIPAMEAizw8iBHRPvZj7N9AMBAGCSsG
  1109. '' SIG '' AQQBgjcVAQQDAgEAMB0GA1UdDgQWBBQpXLkbts0z7rue
  1110. '' SIG '' WX335couxA00KDAZBgkrBgEEAYI3FAIEDB4KAFMAdQBi
  1111. '' SIG '' AEMAQTALBgNVHQ8EBAMCAUYwDwYDVR0TAQH/BAUwAwEB
  1112. '' SIG '' /zANBgkqhkiG9w0BAQQFAAOCAQEARVjimkF//J2/SHd3
  1113. '' SIG '' rozZ5hnFV7QavbS5XwKhRWo5Wfm5J5wtTZ78ouQ4ijhk
  1114. '' SIG '' IkLfuS8qz7fWBsrrKr/gGoV821EIPfQi09TAbYiBFURf
  1115. '' SIG '' ZINkxKmULIrbkDdKD7fo1GGPdnbh2SX/JISVjQRWVJSh
  1116. '' SIG '' HDo+grzupYeMHIxLeV+1SfpeMmk6H1StdU3fZOcwPNtk
  1117. '' SIG '' SUT7+8QcQnHmoD1F7msAn6xCvboRs1bk+9WiKoHYH06i
  1118. '' SIG '' Vb4nj3Cmomwb/1SKgryBS6ahsWZ6qRenywbAR+ums+kx
  1119. '' SIG '' FVM9KgS//3NI3IsnQ/xj6O4kh1u+NtHoMfUy2V7feXq6
  1120. '' SIG '' MKxphkr7jBG/G41UWTGCBGIwggReAgEBMIG1MIGmMQsw
  1121. '' SIG '' CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQ
  1122. '' SIG '' MA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9z
  1123. '' SIG '' b2Z0IENvcnBvcmF0aW9uMSswKQYDVQQLEyJDb3B5cmln
  1124. '' SIG '' aHQgKGMpIDIwMDAgTWljcm9zb2Z0IENvcnAuMSMwIQYD
  1125. '' SIG '' VQQDExpNaWNyb3NvZnQgQ29kZSBTaWduaW5nIFBDQQIK
  1126. '' SIG '' YQYqjQAAAAAACzAMBggqhkiG9w0CBQUAoIGwMBkGCSqG
  1127. '' SIG '' SIb3DQEJAzEMBgorBgEEAYI3AgEEMBwGCisGAQQBgjcC
  1128. '' SIG '' AQsxDjAMBgorBgEEAYI3AgEVMB8GCSqGSIb3DQEJBDES
  1129. '' SIG '' BBDuywKV2zhUda/eUBoNMzbLMFQGCisGAQQBgjcCAQwx
  1130. '' SIG '' RjBEoCaAJABXAE0ASQAgAHAAcgBpAG4AdABlAHIAIABz
  1131. '' SIG '' AGMAcgBpAHAAdKEagBhodHRwOi8vd3d3Lm1pY3Jvc29m
  1132. '' SIG '' dC5jb20wDQYJKoZIhvcNAQEBBQAEgYB2Vi7Wgjx8BqH2
  1133. '' SIG '' 46YWLB+EfmuDlcWOg0IQzJ11Taz0p3SyKPoFM0tpYPvA
  1134. '' SIG '' /NjorlO5qMEuUtKXXn5hXAU+6IfA1kW7rWjRyMoYf6BN
  1135. '' SIG '' Mnuzk+L3ZYM095hAFNy6YOtIH0msH52t/J3rgJdVcnB1
  1136. '' SIG '' IHDGvl9K0iT0+wvHCfC1cm0BKaGCAkwwggJIBgkqhkiG
  1137. '' SIG '' 9w0BCQYxggI5MIICNQIBATCBszCBnjEfMB0GA1UEChMW
  1138. '' SIG '' VmVyaVNpZ24gVHJ1c3QgTmV0d29yazEXMBUGA1UECxMO
  1139. '' SIG '' VmVyaVNpZ24sIEluYy4xLDAqBgNVBAsTI1ZlcmlTaWdu
  1140. '' SIG '' IFRpbWUgU3RhbXBpbmcgU2VydmljZSBSb290MTQwMgYD
  1141. '' SIG '' VQQLEytOTyBMSUFCSUxJVFkgQUNDRVBURUQsIChjKTk3
  1142. '' SIG '' IFZlcmlTaWduLCBJbmMuAhAIem1cb2KTT7rE/UPhFBid
  1143. '' SIG '' MAwGCCqGSIb3DQIFBQCgWTAYBgkqhkiG9w0BCQMxCwYJ
  1144. '' SIG '' KoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wMTEyMDcy
  1145. '' SIG '' MDIzMDRaMB8GCSqGSIb3DQEJBDESBBBQcr7gc8/T5Jz/
  1146. '' SIG '' zs4YUE0FMA0GCSqGSIb3DQEBAQUABIIBAFgRB0KNh4S6
  1147. '' SIG '' v84cecsMH9B8Edq6fSmFxYXHK1T/OBG0SvODIdjhRf5D
  1148. '' SIG '' 0rod1rKYugta35C3QRW6URZ/qL/nqgnadJ240vFw1ANS
  1149. '' SIG '' KhIEatmSr34A0FbNEMEZsspxaG8JI91nv5NgayArbURR
  1150. '' SIG '' x8CV5M+LkaesZyVldDOZ88BdbAFcALMR860d/CXgVa6p
  1151. '' SIG '' Qz8w3lrIQGUzXnuuxaTtRAf22Ba/NSg4FOWz+U4DHUq3
  1152. '' SIG '' Ed0vbzAuzUOLo0EwEB+PPf4yZ2Had3xAkUQfbmb89yK9
  1153. '' SIG '' FMZL1A6aksyHdNB2HB4vgyzXW+KTRbQ4MKttbACrugLn
  1154. '' SIG '' vSRK4Mpa/gWTKBapOlzdKcI=
  1155. '' SIG '' End signature block