check for installed printer

  • Thread starter Thread starter Keith G Hicks
  • Start date Start date
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?
 
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
 
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.
 
Back
Top