【问题标题】:Is there any method for me to automate the printer driver installation?我有什么方法可以自动安装打印机驱动程序吗?
【发布时间】:2019-02-12 22:04:34
【问题描述】:

我想使用 powershell 脚本在 Windows 机器上安装打印机驱动程序,而不是重复单击下一个选项。我尝试了静音模式的 /S 参数,但它进入静音模式并在屏幕上提示下一步并完成,然后选择打印机型号(Zebra gx30t)并安装它。我想自动化整个过程。

【问题讨论】:

  • 由于您没有代码,因此这不是与编码相关的问题,因此对于Stack Overflow 来说是题外话。您也许可以通过Super User 获得帮助 - 关于计算硬件和软件的一般问题是主题。投票相应地移动这个问题。

标签: windows powershell zebra-printers


【解决方案1】:

不完全是 powershell,但我之前可以使用以下命令自动安装打印驱动程序

printui /ia /m "<driver_name>" /f "\\path\to_drivers\oemsetup.inf" /h x64

这应该静默安装驱动程序,注意它需要驱动程序的 .INF 文件

参数说明(来自https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/rundll32-printui

/ia Installs a printer driver by using an .inf file.
/m[model]   Specifies the driver model name. (This value can be specified in the .inf file.)
/f[file]    Species the Universal Naming Convention (UNC) path and name of the .inf file name or the output file name, depending on the task that you are performing. Use /F[file] to specify a dependent .inf file.

/h[architecture]    Specifies the driver architecture. Use one of the following: x86, x64, or Itanium.

【讨论】:

  • 谢谢你一半。如果我没记错的话,我们需要提取打印机 .exe 文件以获取 .INF 文件。不幸的是,提取后我无法找到 inf 文件。我也可以将同一行添加到 .batch 文件吗?再次感谢您的帮助,非常感谢。
  • 正确,您必须以某种方式找到 .inf 文件,我通常在与驱动程序安装相同的包中找到它。但我相信也可以从安装驱动程序,所以这可能是一个选项。是的,这也可以作为批处理文件使用
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-10-24
  • 2017-12-16
  • 1970-01-01
  • 2016-10-07
  • 2021-08-15
相关资源
最近更新 更多