Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Where in a system, does vb get the list of installed printers

Posted on 2006-07-21
4
Medium Priority
?
357 Views
Last Modified: 2010-05-18
Hi

I'm working on an application which needs to obtain the list of printers installed on the machine. I am working with my software and an external software program. I need to know where this external program gets it's list of printers from, does anyone know where in the system software usually gets this info from and are there several different registery locations

Any ideas appreciated.
0
Comment
Question by:eneate
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 43

Assisted Solution

by:TimCottee
TimCottee earned 500 total points
ID: 17153164
Hi eneate,

VB has a Printers collection which enumerates all the available printers installed on a machine. This uses an API call internally to generate the list. All applications should use the same API call, either natively or wrapped into a collection as vb does. After all, that is what it is there for.

Tim Cottee
0
 

Author Comment

by:eneate
ID: 17153207
Hi Tim

Thanks for that the problem is that in the one app it is sometimes listing the printers with capital letters and others without, and this seams to effect how the software then sees the call and sometimes a printer is output to and other times not. Any idea why this would be? I was wondering if there were diffferent registry files which the software might call the list of printers from.

eneate
0
 
LVL 4

Accepted Solution

by:
JRCSystems earned 500 total points
ID: 17159628

Key for all local printers:
HKEY_LOCAL_Machine\System\CurrentControlSet\Control\Print\Printers

Network Printer(s) and User-modes of local printers:
HKEY_CURRENT_USER\Printers\Connections
and
HKEY_CURRENT_USER\Printers\DevModes2

I would point out, if the original problem, has only to do with uppercase, vs lowercase....

Why not use either $UCASE() or LCASE$() on both arguments in the comparision to force them to the same case?
That would seem easier than digging through the registry.
0
 

Author Comment

by:eneate
ID: 17160398
yo  thanks for that, it all seams to do the trick.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question