Check if logical printer is installed

Author: (hoss)

I would like it very much if I could check for the existence of a logical printer via proc.

Perhaps something like this....

if ($logicalprinter("HPLASER") = 1) ;--  where 1 exists and 0 does not

   print "HPLASER","C"




  1. Hi.

    You can do it using signatures.

    Uniface stores logical printers info into windows registry.

    You have to look if a key like this exists:


    where USYS9 is your Uniface installation directory and PRT_PDF is your printer name.

    Look at ADVAPI32 (windows dll).



    Author: ezioze (
  2. Hi,

    Since 9.3 you can use the following to get a list of the PRT_xxx keys under the Uniface USYS9 registry key:

      $1 = $setting("", "[PRT_<gold>*]", "REGKEYS")

    This gets you a list of PRT_xxx values, representing all the local printer definitions you have made. You can use all the Uniface list functions to process this list. In case of error, $procerror is -1118 (non-existence of a key is not an error... that gets you an empty list!). Note that $setting is as yet undocumented and unsupported.










    Author: etienne (