• Welcome to Tux Reports: Where Penguins Fly. We hope you find the topics varied, interesting, and worthy of your time. Please become a member and join in the discussions.

check for installed printer

R

Ronin

Flightless Bird
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?

--
Ronin

"Keith G Hicks" <krh@comcast.net> wrote in message
news:-ODhsIUuwKHA.732@TK2MSFTNGP06.phx.gbl...
> Any reason it's not okay just do read the subkeys?
>
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
> NT\CurrentVersion\Print\Printers subkeys
>
> I recoded my Inno project to do that and it's MUCH easier than the other
> way I was working on.
>
>
> "Keith G Hicks" <krh@comcast.net> wrote in message
> news:up8X%23%23gwKHA.732@TK2MSFTNGP06.phx.gbl...
>> Is there some sort of command line tool that will let me check for the
>> existence of an installed printer? I knwo I can use Prnmngr.vbs and
>> related tools but they give me too much information. I'm hoping there's
>> something simpler that will just confirm if a printer is installed or
>> not.
>>

>
>
 
J

John John - MVP

Flightless Bird
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

Keith G Hicks wrote:
> Any reason it's not okay just do read the subkeys?
>
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
> NT\CurrentVersion\Print\Printers subkeys
>
> I recoded my Inno project to do that and it's MUCH easier than the other way
> I was working on.
>
>
> "Keith G Hicks" <krh@comcast.net> wrote in message
> news:up8X%23%23gwKHA.732@TK2MSFTNGP06.phx.gbl...
>> Is there some sort of command line tool that will let me check for the
>> existence of an installed printer? I knwo I can use Prnmngr.vbs and
>> related tools but they give me too much information. I'm hoping there's
>> something simpler that will just confirm if a printer is installed or not.
>>

>
>
 
K

Keith G Hicks

Flightless Bird
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.


"Ronin" <wanderer> wrote in message
news:-OVeJTfvwKHA.4752@TK2MSFTNGP04.phx.gbl...
> 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?
>
> --
> Ronin
>
> "Keith G Hicks" <krh@comcast.net> wrote in message
> news:-ODhsIUuwKHA.732@TK2MSFTNGP06.phx.gbl...
>> Any reason it's not okay just do read the subkeys?
>>
>> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
>> NT\CurrentVersion\Print\Printers subkeys
>>
>> I recoded my Inno project to do that and it's MUCH easier than the other
>> way I was working on.
>>
>>
>> "Keith G Hicks" <krh@comcast.net> wrote in message
>> news:up8X%23%23gwKHA.732@TK2MSFTNGP06.phx.gbl...
>>> Is there some sort of command line tool that will let me check for the
>>> existence of an installed printer? I knwo I can use Prnmngr.vbs and
>>> related tools but they give me too much information. I'm hoping there's
>>> something simpler that will just confirm if a printer is installed or
>>> not.
>>>

>>
>>

>
 
Top