Solved

Service can't print while not logged in

Posted on 2002-07-29
5
155 Views
Last Modified: 2010-05-01
When I have my VB app running as a service and attemt to print to one of the printers I get the error

Unable to set selected printer (\\Server\Printer) as active printer when I try to set the active printer

and
Print Error 482 when I try to print regardless (as you do)

which is probably no active printer (surprise surprise)

Yes, I'm not logged in the service executes under a service account.

I can see the network drives not logged in (using unc's) but the printers disapear.
0
Comment
Question by:innovate
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 3

Expert Comment

by:sanjaykattimani
ID: 7187275
Yes if you are not logged in, you will not be able to print on network printer as you will not have access to them. if you want you can avoid the error by checking the currently logged in user name in your code.
0
 
LVL 2

Author Comment

by:innovate
ID: 7187363
Services such as BackupExec are able to print to network printers when the Server is not logged in so it is possible.

The Service executes with Admin rights and can see ALL network drive shares, it MUST be able to see the printers.
0
 
LVL 4

Accepted Solution

by:
mcoop earned 100 total points
ID: 7187425
You may need to create a temprary 'share' to the desired printer - although I know how to connect to shares in code - I don't know how to get to the printers...
0
 
LVL 26

Expert Comment

by:EDDYKT
ID: 7187869
Can you run your service as specific user by setting your service properties
0
 
LVL 2

Author Comment

by:innovate
ID: 7189602
Yes EDDYKT,

As mentioned the service executes under a particular account which has Admin rights.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month5 days, 13 hours left to enroll

626 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