Sei sulla pagina 1di 4

Add Print Model to Comment Field Release Notes

This script is used to add the device model name to the comments field for any print queue that is using
the HP niversal Print !river "P!#$
Disclaimer
% &'() Copyright He*lett+Pac,ard !evelopment Company- .$P$
Reproduction- adaptation- or translation *ithout prior *ritten permission is prohi/ited- e0cept as allo*ed
under the copyright la*s$ The information contained herein is su/1ect to change *ithout notice$ The only
*arranties for HP products and services are set forth in the e0press *arranty statements accompanying
such products and services$ Nothing herein should /e construed as constituting an additional *arranty$
HP shall not /e lia/le for technical or editorial errors or omissions contained herein$
Disclaimer of Warranty and Support
TH2 34FT5AR2 AN! AN6 R2.AT2! !4CM2NTAT74N AR2 PR487!2! 9A3 739- 57TH4T
5ARRANT6 4R 3PP4RT 4F AN6 :7N!$ TH2 2NT7R2 R73: A3 T4 TH2 32- R23.T3 AN!
P2RF4RMANC2 4F TH2 34FT5AR2 AN! !4CM2NTAT74N AR2 A33M2! ;6 64 AN! TH432
T4 5H4M 64 PR487!2 TH2 34FT5AR2 AN! !4CM2NTAT74N$ H25.2TT+PAC:AR!
C4MPAN6- H25.2TT+PAC:AR! !282.4PM2NT C4MPAN6- AN! TH27R AFF7.7AT23 AN!
3;37!7AR7AR723 H2R2;6 3P2C7F7CA..6 !73C.A7M AN6 AN! A.. 5ARRANT723- 2<PR233-
7MP.72! 4R 3TATT4R6- 7NC.!7N= ;T N4T .7M7T2! T4 TH2 7MP.72! 5ARRANT723 4F
M2RCHANTA;7.7T6- F7TN233 F4R A PART7C.AR PRP432- T7T.2 AN! N4N7NFR7N=2M2NT$
Limitation of Liability
7N N4 282NT 3HA.. H25.2TT+PAC:AR! C4MPAN6- H25.2TT+PAC:AR! !282.4PM2NT
C4MPAN6 4R TH27R AFF7.7AT23 AN! 3;37!7AR7AR723 ;2 .7A;.2 F4R AN6 C.A7M- !AMA=23
"!7R2CT- 7N!7R2CT- 7NC7!2NTA.- PN7T782- 3P2C7A. 4R 4TH2R !AMA=23- 7NC.!7N=
57TH4T .7M7TAT74N- !AMA=23 F4R .433 4F ;37N233 PR4F7T3- ;37N233 7NT2RRPT74N-
.433 4F ;37N233 7NF4RMAT74N- 4R 4TH2R P2CN7AR6 .433 AN! TH2 .7:2# 4R 4TH2R
.7A;7.7T6 5HAT34282R- 5H2TH2R 7N AN ACT74N 4F C4NTRACT- T4RT 4R 4TH2R5732-
AR737N= FR4M- 4T 4F 4R 7N C4NN2CT74N 57TH TH2 34FT5AR2 4R !4CM2NTAT74N- 282N
7F A!8732! 4F TH2 P4337;7.7T6 4F 3CH C.A7M- !AMA=23 4R 4TH2R .7A;7.7T6$
Acknowledgements
Microsoft- 5indo*s- 5indo*s <P- 5indo*s 8ista- 5indo*s>- 5indo*s ?- 5indo*s 3erver &''@-
5indo*s 3ever &''@R&- 5indo*s 3erver &''?- 5indo*s 3erver &''?R&- 5indo*s 3erver &'(& and
5indo*s 3erver &'(&R& are $3$ registered trademar,s of Microsoft Corporation in the nited 3tates
andAor other countries$
Version
2dition &- Bune &'(( "first released in PAR: ($C#
1
Release Notes version ) Buly &'()
Supersedes
2dition (- !ecem/er &''D "first released in PAR: ($(#
Description
This script is used to add the device model name to the comments field for any print queue that is using
the HP niversal Print !river "P!#$ The script chec,s the driver name for each print queue on a server$
7f the driver name contains EHP niversal PrintingF- the model name is read from the registry and added
to the e0isting comments for that print queue$
Support Policy
This tool is not eligi/le for HP 3upport$ ;efore using this tool- please revie* the sections 9!isclaimer of
5arranty and 3upport9 and 9.imitation of .ia/ility9 in this document$ Feed/ac, a/out the tool
"enhancement requests and /ug reports# can /e sent via email to updGpar,Hhp$com$
Update recommendation
Recommended/Adised 7ncludes ne* enhancements- features- andAor minor /ug fi0es$ HP
recommends all customers to update$
Product !odels
Compati/le *ith the HP niversal Print !river "P!# and HP model+specific printer drivers
Deices Supported
Refer to the specifications ta/ at ***$hp$comAgoAupd for a list of devices *hich are supported /y the HP
P!$
"perating Systems
Microsoft 5indo*s <P 3P@II
Microsoft 5indo*s 8istaI
Microsoft 5indo*s >
Microsoft 5indo*s ? A ?$(
Microsoft 5indo*s 3erver &''@ 3P& A &''@R& 3P&I
Microsoft 5indo*s 3erver &''? A &''?R&
Microsoft 5indo*s 3erver &'(& A &'(&R&
IMicrosoft has ended mainstream support for this operating system$
IIMicrosoft has ended e0tended support for this operating system$
2
Languages
2nglish "7nternational#
#n$ancements
The latest version includes a fi0 for 5indo*s 3erver &''? R&
%i&es/%i&es 'istory
The latest version includes a fi0 for 5indo*s 3erver &''? R&
(ssues and Workarounds
The script *ill concatenate the device model string to *hatever string is currently in the comments field$
This may /e a concern for the follo*ing reasonsJ
7f the script is run more than once- then the device model *ill /e appended more than once$
There are no chec,s in the script regarding string length$ 7f the comments field is e0cessively
long to /egin *ith- the device model may /e truncated or an error may result$
(nstallation instructions
No installation is necessary for the script$
Prere)uisites
7n order for the script to function properly- the Microsoft prnadmin$dll must /e installed on the system$
This dll is part of the 5indo*s &''@ Resource :it- *hich is a free do*nload from Microsoft$
To use AddModelToComments$v/s copy the dll from the resource ,it to the same folder as the script and
run the script as outlined in the sage section of this document$
Usage
Run the follo*ing steps after the print queues have /een upgraded to use HP P!$
*reate doit+bat file
4pen a command prompt *indo*$
4n a @&+/it system- enter the follo*ing on the command lineJ
o cscript ANologo AddModelToComments$v/s Kdoit$/at
4n a L)+/it system- enter the follo*ing on the command line
o M*indirMN3ys545L)Ncscript ANologo AddModelToComments$v/s Kdoit$/at
This *ill create a /atch file named doit$/at in the current directory$ This /atch file contains all the
commands to *rite the device name to the comments field$
3
Run doit+bat
Prior to running the /atch file- open the /atch file and inspect it to ensure that only the intended print
queues and actions are included$ 7f there are print queues listed that should not /e modified- delete the
corresponding entry from the /atch file$
4nce the contents of the /atch file have /een verified- run the /atch file doit.bat from the command
prompt
*ommand Line Synta&
*ommand Line, AddModelToComments O+lPQ O+s serverQ

ArgumentsJ
+l + put model in location field instead of comments field
+r + replace contents instead of concatenate
+s + cluster or remote server name
+v + ver/ose mode + list all printers and drivers found
+0 + e0ecute no* instead of creating /atch file
+P + display command usage
#&ample, AddModelToComments +l +r +s serverGname
Sample file doit.bat
The file doit$/at is automatically generated /y the AddModelToComments$v/s script and uses the
Microsoft printui$dll utility to ma,e the changes to the comments field$ The Printui$dll synta0 and
parameters should not /e confused *ith the parameters used to control AddModelToComments$v/s$
nder normal usage- the doit$/at file should not /e edited /y the user and should /e changed 4N.6 if the
user is familiar *ith the correct usage of printui$dll$
The synta0 of the Microsoft printui$dll utility is documented in the Microsoft Print7$!.. serRs =uide and
Reference availa/le at httpJAA***$microsoft$comA*indo*sserver&''@AtechinfoAovervie*Aprintuidll$msp0
rundll32 printui.dll,PrintUIEntry /Xs /n "HP CLJ 3800 upstairs" comment
"ArtDepartment HP Color LaserJet 3800"
The /atch file runs the printui$dll once for each printer$ 7n this e0ample- the comments field originally
contained the string EArt!epartmentF for this printer$ After doit.bat runs the comments field *ill /e set to
EArt!epartment HP Color .aserBet @?''9
4

Potrebbero piacerti anche