[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Printers Object Not Exposed on Server

Posted on 2004-11-10
4
Medium Priority
?
635 Views
Last Modified: 2008-02-01
I have developed an application in Visual Basic 6 that will spawn multiple instances of the printing our company's billing statements.  It works great from a PC, but it fails when executed as a service through vb scripting.

When it fails, my error log shows that that the exe was uable to view the printers object.  The error number returned is #484 "Problem getting printer information from the system.  Make sure the printer is set up correctly."

The ap was developed on a Windows 200 PC, and the Server is Windows 2000, sp 4.

The really odd thing about this is that it will execute fine if I log into the server remotely and execute it using "Start | Run".

0
Comment
Question by:dgorden
  • 2
4 Comments
 
LVL 28

Expert Comment

by:vinnyd79
ID: 12546382
Is the service set to interact with the desktop?Have you tried setting the service to run under the administrator account or an account that has the printers set-up in the profile.
0
 

Author Comment

by:dgorden
ID: 12546593
No, the service is not supposed to interact with the desktop.  It does however read and write to an MS SQL database with no issues.

We have set up an NT account just for this process, and given the account Admin rights.  Rights to the printers have been given to the account.  The default printer is the Acrobat PDF Writer, and it has even been shared and set to "use printer off line".  

0
 
LVL 2

Accepted Solution

by:
Merrion earned 1000 total points
ID: 12568025
The underlying API to enumerate the printers cannot be called from a service.  You need to hard code the name of the printer (in a ini file?) or pass it in some other way.
0
 

Author Comment

by:dgorden
ID: 12568290
Well, thanks for the help.  
It's not the answer I hoped for, but I will put this in an ini file.
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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

873 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