Jump to content
Sign in to follow this  

list of windows printers name

Recommended Posts

Hello, someone can help me in this problem?


I need to write a script that process a list of printers from the folder "Printers and Fax" of windows XP.

there is an autoit function that allows to obtain a list of names of defined printers of windows?


Share this post

Link to post
Share on other sites


This function will list all the installed printers. Requires an understanding of C/C++ programming to use though.

Share this post

Link to post
Share on other sites

I use this, personally. Most of my printers are network, but I believe it captures local as well:

$wbemFlagReturnImmediately = "&h10"
$wbemFlagForwardOnly = "&h20"

$WMI = ObjGet("winmgmts:\\" & @ComputerName & "\root\CIMV2")
$aItems = $WMI.ExecQuery("SELECT * FROM Win32_Printer", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)

For $printer in $aItems
 MsgBox(0, "Printers", $printer.Name)

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...