emendelson Posted December 27, 2011 Posted December 27, 2011 (edited) EDIT: I found the answer to this one, exactly what I was looking for, right here:It's obviously going to be easy to adapt this to return the printer name to a variable. Apologies for wasting bandwidth.====== Original post below =======I've searched the forum for the answer to this question but haven't found one. Has anyone written a script that displays a list of the names of the currently-installed Windows printers, and lets the user select one, and then inserts that name as a variable?I've found quite a few scripts that return very detailed printer information, but none that simply list the names of each printer.I see that I need to start with something like this code:For $i = 1 To 100 Local $var = RegEnumVal("HKEY_CURRENT_USERSoftwareMicrosoftWindows NTCurrentVersionDevices", $i) If @error <> 0 Then ExitLoop MsgBox(4096, "Printer name " & $i, $var) NextBut I don't see how to get each item into a list that a user can choose from. That's probably the simplest part of the problem, and I apologize for asking a beginner's question.Thanks for any help. Edited December 27, 2011 by emendelson
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now