Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

TPrinter usage in NT Service

Posted on 2000-03-24
2
Medium Priority
?
332 Views
Last Modified: 2010-04-04
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
Comment
Question by:wesr
2 Comments
 
LVL 1

Accepted Solution

by:
snoop_doggy_dogg earned 400 total points
ID: 2655589
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
 

Expert Comment

by:davecee
ID: 2656911
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

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question