网络打印机安装脚本错误

发布于 2024-10-06 15:24:24 字数 441 浏览 0 评论 0原文

我有一个 VB 脚本,用于将学校中的所有计算机连接到打印服务器上的联网打印机。下面的代码是我正在使用的脚本。脚本输出“错误行:4字符:1 Windows无法打开此程序,因为它受到软件限制策略的限制”

Set WshNetwork = CreateObject("WScript.Network") PrinterPath = "\\018printserver\barrett" PrinterDriver =“戴尔 2330dn 激光打印机” WshNetwork.AddWindowsPrinterConnection PrinterPath、PrinterDriver WshNetwork.SetDefaultPrinter "\\018printserver\barrett"

用户计算机运行的是 Windows XP,服务器是 Windows Server 2003 R2。关于原因有什么想法吗?

I have a VB script that I am using to connect all the computers in a school to a Networked printer on a print server. The code below is the script I am using. The script out puts "Error Line:4 Char:1 Windows cannot open this program because it has been limited by your software restriction policy"

Set WshNetwork = CreateObject("WScript.Network")
PrinterPath = "\\018printserver\barrett"
PrinterDriver = "Dell 2330dn Laser Printer"
WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver
WshNetwork.SetDefaultPrinter "\\018printserver\barrett"

The user computers are running windows xp and the server is Windows server 2003 R2. Any ideas on the cause?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

似狗非友 2024-10-13 15:24:24

听起来好像启用了组策略来阻止脚本中执行的操作。

也许检查事件查看器以获取更多详细信息。可能存在策略规则标识符或指南。

It sounds as if there's a Group Policy enabled to block the actions being taken in your script.

Perhaps check the Event Viewer for more details. There may be a Policy Rule identifier or Guid.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文