check for installed printer

R

Ronin

None I can think of. But is it really simpler/faster than the WMIC call
suggested by John John? I don't know Inno, is it a matter of difficulty when
calling a module from inside your project?
 
J

John John - MVP

Or shorter path:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers

These two keys are linked, changes made in one key are reflected in the
other key. When printers are installed the first entry is made in the
Control key, every printer installed has a subkey in both keys.

John
 
K

Keith G Hicks

Yeah, a lot easier. When I oribinally posted this I thought I'd have no
chioce but to get the command prompt output into a text file. All I need to
do with the registry is to loop through the subkeys and test each one until
I get the one I'm looking for. The other way means creating a text file by
running a batch file or some vbs code and then openign and reading through
the text file which was causing me trouble in Inno. It's not bad but it's
all very round about. I figured out how but it wasn't elegant. The registry
key wa is only about 6 lines of code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top