You are on page 1of 4

Add Print Model to Comments Field Release Notes

Installation and system requirements........................................................................................ 3 Usage......................................................................................................................................... 3 Sample file doit.bat.................................................................................................................... 4 Limitations................................................................................................................................. 4

EXPRESS. Limitation Of Liability IN NO EVENT SHALL HEWLETT-PACKARD COMPANY. INDIRECT. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH CLAIM. 12 / 2009 . HEWLETTPACKARD COMPANY. TORT OR OTHERWISE. INCLUDING WITHOUT LIMITATION. RESULTS AND PERFORMANCE OF THE SOFTWARE AND DOCUMENTATION ARE ASSUMED BY YOU AND THOSE TO WHOM YOU PROVIDE THE SOFTWARE AND DOCUMENTATION.P. Edition 1. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR DOCUMENTATION. HEWLETT-PACKARD DEVELOPMENT COMPANY. HEWLETT-PACKARD DEVELOPMENT COMPANY OR THEIR AFFILIATES AND SUBSIDIARIARIES BE LIABLE FOR ANY CLAIM. SPECIAL OR OTHER DAMAGES. THE ENTIRE RISK AS TO THE USE. DAMAGES OR OTHER LIABILITY. DAMAGES FOR LOSS OF BUSINESS PROFITS. INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY. IMPLIED OR STATUTORY. TITLE AND NONINFRINGEMENT. ARISING FROM. OR OTHER PECUNIARY LOSS AND THE LIKE) OR OTHER LIABILITY WHATSOEVER. WHETHER IN AN ACTION OF CONTRACT. L. AND THEIR AFFILIATES AND SUBSIDIARIARIES HEREBY SPECIFICALLY DISCLAIM ANY AND ALL WARRANTIES. Disclaimer Of Warranty and Support THE SOFTWARE AND ANY RELATED DOCUMENTATION ARE PROVIDED "AS IS". WITHOUT WARRANTY OR SUPPORT OF ANY KIND. INCIDENTAL. FITNESS FOR A PARTICULAR PURPOSE.Warranty and Licensing © Copyright 2009 Hewlett-Packard Development Company.DIRECT. DAMAGES. BUSINESS INTERRUPTION. PUNITIVE. LOSS OF BUSINESS INFORMATION.

If you are using AddModelToComments.vbs >doit.bat This will create a batch file named doit. 3. from the command line. This batch file contains all the commands to write the device name to the comments field. 2.bat from the command prompt . If there are printers on this list that you do not want modified. 1. Open a command window. From the command line. Open a command window.vbs >doit. simply copy the dll from the resource kit to the same folder as the script. on 64 bit systems enter %windir%\SysWOW64\cscript /Nologo AddModelToComments.vbs on a system other than Windows Server 2003. on 32 bit systems enter regsvr32 prnadmin. Run the batch file doit.dll command string to concatenate the MODEL_NAME string after any existing comments Installation and system requirements This script does not require any special installation.bat 2. 1.dll 2. These steps are designed to be run on the server AFTER queues have been upgraded to UPD. require the Microsoft prnadmin. which is a free download from Microsoft.dll Usage This is a two step process. on 32 bit systems enter cscript /Nologo AddModelToComments. on 64 bit systems enter %windir%\SysWOW64\regsvr32 prnadmin.bat in the current directory. If the driver name contains the string “HP Universal Printing” o Reads the MODEL_NAME from the registry o Outputs a printui. from the command line. however.dll be installed on the system. 4.Overview • Enumerates all the print queues on the server • Checks the name of the driver for that queue. from the command line. 2. simply delete those lines from the batch file. The script does. The user is advised to open the batch file and inspect it to verify that it will do what is intended on the intended printers. and register it using the following instructions. This dll is part of the Windows 2003 Resource Kit.

vbs. This file should not be edited by the user under normal circumstances. After doit. then the device model will be appended more than once.list all printers and drivers found -x . Printui. The syntax of the Microsoft printui.mspx rundll32 printui.bat runs the comments field will be “ArtDepartment HP Color LaserJet 3800" Limitations The script in its current form will concatenate the device model string to whatever string is currently in the comments field.vbs script and uses the Microsoft printui.dll. the device model may be truncated or an error may result.dll utility to do the actual work.PrintUIEntry /Xs /n "HP CLJ 3800 upstairs" comment "ArtDepartment HP Color LaserJet 3800" The batch file runs the printui.dll has its own syntax and parameters and should not be confused with the parameters used to control AddModelToComments. the comments field originally contained the string “ArtDepartment” for this one printer. • There are no checks in the script regarding string length.put model in location field instead of comments field -r .verbose mode . . This may be a concern for the following reasons: • If the script is run more than once.com/windowsserver2003/techinfo/overview/printuidll.cluster or remote server name -v .Command Line: AddModelToComments [-l?] [-s server] Arguments: -l .microsoft.dll once for each one of the printers.bat is automatically generated by the AddModelToComments.display command usage Example: AddModelToComments -l -r -s server_name Sample file doit.bat The file doit. In this example. and should be changed ONLY if the user really knows what they are doing.DLL User's Guide and Reference available at http://www. If the comments field is excessively long to begin with.replace contents instead of concatenate -s .execute now instead of creating batch file -? .dll utility is documented in the Microsoft PrintUI.