Board index » delphi » Printer.Printers - not listing printer connections if used in NT service

Printer.Printers - not listing printer connections if used in NT service

For some reason Printer.printers doesn't contain printer connections if i
use it in NT service.
Because of that it simply gives me access violation any time i try to use
Printer as Default printer is set to one of printer connections not in
Printers.

Any ideas how to avoid the problem?

Thanks

Vitaliy

 

Re:Printer.Printers - not listing printer connections if used in NT service


You say "printer connections".
Don't forget, that network printers are stored as a per-user setting.
On the second hand, NT services doesn't have any network access, if it runs
as SYSTEM account. If you want to use any network resource (printer,
machine, etc) you have to run that service as a user account. This can be
set in control panel, but in this way, user password is stored in the
registry for this service to run.

--
Levente VALENT
vl...@freemail.hu

Other Threads