• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 337
  • Last Modified:

TPrinter usage in NT Service

1) Attempting to set Printers.PrinterIndex within an NT Service causes a 'No Default Printer Selected' exception.
The same app written as a stand alone exe works fine.

2) Network printers don't show in the Printers.printers list, but they do under Win98. I suppose I can do my own EnumPrinters call but if TPrinter doesn't know about them it doesn't do me any good. I won't have a valid printerIndex to set it to! Help!  
0
wesr
Asked:
wesr
1 Solution
 
snoop_doggy_doggCommented:
I'm not sure, but aren't default printers setup on an account-by-account basis?  Perhaps the account your service is running under does not have a default printer.  If you are running under the localsystem account, you probably won't be able to access a network printer anyway.

....just a guess

Woof!
http://www.brighteroutlook.com
0
 
daveceeCommented:
It means that the account you're running the service under doesn't have any printers set up. You need to either change the account it runs under (in the Services control panel) or set up a network printer in the account it's running under now.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now