错误"设置访问打印机的PrinterName“是无效的"从Windows服务打印时 [英] Error "Settings to access printer 'printername' are not valid" when printing from Windows service

查看:4297
本文介绍了错误"设置访问打印机的PrinterName“是无效的"从Windows服务打印时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

打印到网络打印机,当我提到的错误。

I get the error mentioned when printing to a network printer.

该错误并不在XP / Win2003的运行时或发生在一个WinForm应用程序时使用本地打印机。

The error does not occur when run under XP/Win2003, in a WinForm app or when a local printer is used.

当为在Vista / Win7的/ Win2008的Windows服务和打印到网络打印机运行错误不会只发生。

The error does only occur when run as a Windows Service under Vista/Win7/Win2008 and printing to a network printer.

Windows服务在具有访问网络打印机的网络用户运行。在我印我检查的PrinterName(包括网络路径)是确定的,通过可用的打印机循环。

The Windows service runs under a network user that has access to the network printer. Before I print I check if the printername (including network path) is ok by looping through the available printers.

这又如何解决呢?

推荐答案

由通过注册表添加打印机系统用户黑客在微软的文档中描述解决:的 http://support.microsoft.com/kb/184291/en-us

Solved by adding the printer to the SYSTEM user via a registry hack as described in the Microsoft doc: http://support.microsoft.com/kb/184291/en-us.

这篇关于错误"设置访问打印机的PrinterName“是无效的"从Windows服务打印时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆