|
|
|
||||||||||||||||||||||||||||||||||||||||
|
ICT-Hotlist TopicListPrinters by vanSoest.itCurrent versionListPrinters latest version is 1.0.0.0 and a .Net 4.x release can also be downloaded.Main feature overview
ListPrinters is ideal for listing the currently installed printers using the command prompt (CLI) and batch files. The output can be redirected to a text file on a file server share. The output can be parsed for strings using the Windows standard FINDSTR command Contents
HistoryThe first version of ListPrinters was written to perform a printer inventory on networked desktops during the log on process of the users. ListPrinters runs on the command line or in batches and was build using the latest technology (Visual Studio C#).FeaturesThe program ListPrinters is designed as a small program so it runs quickly during log on of the users. ListPrinters has the following features:
LicenseThe program ListPrinters is licensed according to the EULA in the download. Read the EULA carefully before using the program. A recent copy can be downloaded hereYOU AGREE TO BE BOUND BY THE TERMS OF THIS EULA BY INSTALLING, COPYING, OR OTHERWISE USING THE SOFTWARE. IF YOU DO NOT AGREE, DO NOT INSTALL, COPY, OR USE THE SOFTWARE. ManualUser InterfaceThe fully functioning program ListPrinters is designed to run on the command line or from Windows batches. The ListPrinters help function is shown by using the command ListPrinters /h or any other option.C:\demo>ListPrinters.exe /h ****************************************************************************** * ListPrinters lists the printers in current computer. (for .net 4) * * (C)Copyright 2016 - 2024 vanSoest.it by J.P.G. van Soest * * * * Usage ListPrinters > <outputfile> * ****************************************************************************** C:\demo>ListPrinters.exe Send To OneNote 2013 PDFCreator Microsoft XPS Document Writer Microsoft Print to PDF Fax \\NLAALPRTSRV1\NLAALPRT1 C:\demo>ListPrinters.exe > \\NLAALFS1\PrinterData$\%UserName%-%ComputerName%.txt C:\demo>type \\NLAALFS1\PrinterData$\johan-NLAALNB02.txt Send To OneNote 2013 PDFCreator Microsoft XPS Document Writer Microsoft Print to PDF Fax \\NLAALPRTSRV1\NLAALPRT1 Data parsing examplesShould you have included the program ListPrinters in a batch file, configured to write the output to a network share, output can be analysed using the standard Windows command FINDSTR using the following examples. The file name is constructed using the environment variables %UserName%, containing the log on name of the currently logged on user, and the name of the computer from %ComputerName%. The file in this example is stored on the file server share \\NLAALFS1\PrinterData$\.
ListPrinters.exe > \\NLAALFS1\PrinterData$\%UserName%-%ComputerName%.txt
When opening the directory in a command prompt window you can use the following examples:
01| C:\demo>net use y: \\NLAALFS1\PrinterData$ 02| The command completed successfully. 03| 04| C:\demo>y: 05| 06| Y:\>FINDSTR /I nlaal *.txt 07| johan-NLAALNB02.txt:\\NLAALPRTSRV1\NLAALPRT1 08| john-NLAALNB02.txt:\\NLAALPRTSRV1\NLAALPRT1 09| paul-NLAALNB03.txt:\\NLAALPRTSRV1\NLAALPRT2 10| 11| Y:\>FINDSTR /I nlaalprtsrv1 *.txt 12| johan-NLAALNB02.txt:\\NLAALPRTSRV1\NLAALPRT1 13| paul-NLAALNB03.txt:\\NLAALPRTSRV1\NLAALPRT2 14| 15| Y:\>FINDSTR /I nlaalprt1 *.txt 16| johan-NLAALNB02.txt:\\NLAALPRTSRV1\NLAALPRT1 17| john-NLAALNB02.txt:\\NLAALPRTSRV1\NLAALPRT1 Line 06 shows all the users having a printer or use the print server in the location Aalst in the Netherlands (NLAAL). Line 11 shows an example of finding all the users and computers using the print server NLAALPRTSRV1. It shows Johan and Paul using the printers NLAALPRT1 and NLAALPRT2. Line 15 shows an example to find all users and computers using the printer NLAALPRT1. The output of the FINDSTR command can be redirected to another file for processing in Excel. InstallationDownload, unzip and copy the program ListPrinters anywhere you want on the disk.System requirementsAny system running .net 2.0 or newer is able to run ListPrinters
Support matrixvanSoest.it will only support the latest version of free software.DownloadUpon clicking the "Start download process" button, you get to another web page where you have to agree to the End User License Agreement (EULA) before you can download the program ListPrinters.Frequently Asked Questions (FAQ)Just use the postcard icon in the left menu to ask a question.
You may vote your opinion about this article:
Scripts and programming examples disclaimerUnless stated otherwise, the script sources and programming examples provided are copyrighted freeware. You may modify them, as long as a reference to the original code and hyperlink to the source page is included in the modified code and documentation. However, it is not allowed to publish (copies of) scripts and programming examples on your own site, blog, vlog, or distribute them on paper or any other medium, without prior written consent.Many of the techniques used in these scripts, including but not limited to modifying the registry or system files and settings, impose a risk of rendering the Operating System inoperable and loss of data. Make sure you have verified full backups and the associated restore software available before running any script or programming example. Use these scripts and programming examples entirely at your own risk. All liability claims against the author in relation to material or non-material losses caused by the use, misuse or non-use of the information provided, or the use of incorrect or incomplete information, are excluded. All content is subject to change and provided without obligation. |