Technical Anshu
Tutorials Blog
🛠️ 定制套餐

构建自定义 PDQ 部署包并查找静默安装开关

每个办公室都有一种图书馆没有的应用程序——会计软件包、内部工具、供应商的怪异。自定义 PDQ 部署包可以处理它,但前提是安装真正静默运行。本指南是关于开关搜索的:如何每次为任何安装人员找到正确的静默参数。

✍️ Technical Anshu🪟 Windows 10 / 11⏱️ 8 minute read
🎥 包创建和静默安装是视频的核心章节 - 在构建您自己的包之前观看它们

在 100 个屏幕上弹出安装向导的部署比没有部署更糟糕 - 安装程序等待任何人都不应单击的“下一步”按钮,作业最终会失败或超时。自定义软件包的全部技巧是让安装程序从头到尾无人值守地运行。以下是技术人员使用的方法(按有效顺序排列)。

Silent Switches by Installer Family (reference)
MSI file setup.msi /qn /norestart Inno Setup setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART NSIS setup.exe /S (capital S) InstallShield setup.exe /s /v"/qn" Ask the installer itself: setup.exe /?
👆 四个安装程序系列涵盖了大多数 Windows 软件 - 首先识别该系列,然后使用其 switch 方言(重新创建的面板作为参考)
1

首先确定安装程序系列

.msi 文件很简单:它是一个 Windows Installer 程序包,并且始终响应 /qn(无接口)和 /norestart。 An .exe could be anything, so identify it before guessing: right-click → Properties often names the maker (Inno Setup, NSIS, InstallShield), and simply running setup.exe /? in a test machine frequently prints the supported switches.盲目猜测开关是向导最终出现在用户屏幕上的方式。

2

Switch Hunt,一步一步

  1. 阅读供应商自己的文档 - 企业和教育软件几乎总是记录其无人值守安装
  2. 在测试 PC 上使用 /? 或 /help 运行安装程序,并记下它提供的内容
  3. 应用上面参考面板中的家庭方言
  4. 在一台计算机或虚拟机上进行测试,观察进程列表 - 静默安装不显示窗口并在可预测的时间内完成
  5. 按您的方式确认成功:该应用程序出现在“添加/删除程序”中并实际启动
3

在 PDQ Deploy 中构建包

创建一个新包并添加一个指向您的安装程序文件的安装步骤 - PDQ 将其复制到存储库中。将开关放入步骤的参数字段中。 Then set the details that separate tidy packages from messy ones: add 3010 and 1641 to the Success Codes so a requested reboot counts as success rather than failure;决定运行方式模式(部署用户是正常选择;仅当安装确实需要用户会话时才使用登录用户);并设置错误处理以在该步骤失败时停止包。

4

添加安装步骤

真正的包裹很少是一步到位的。 A typical shape: a Command step first to uninstall the old version or close the running app, the Install step, a File Copy step to drop in the company configuration, and a Reboot step only if the software insists. PDQ 还为任何可编写脚本的内容提供 PowerShell 步骤。 Remember the edition rule: multi-step packages are a paid feature — in free mode you get a single Install step, so design simple or trial the full version.

5

黄金法则——小测试,然后信任

将完成的包部署到您自己的 PC。然后给一位合作用户。然后才到一个团。自定义软件包赢得了环的信任,因为每个安装程序都隐藏着一个惊喜 - 许可证提示、.NET 先决条件、重新启动要求。在两台机器上发现惊喜是一个教训;发现它在两百是一个事件。

🔴经典陷阱:安装程序在快速测试中看起来很安静,但在类似 SYSTEM 的部署上下文下打开一个隐藏的对话框,然后永远等待。如果部署挂起且没有错误,请首先怀疑是否存在看不见的提示 - 在观看屏幕的同时重现安装,就像部署帐户运行它一样。

🎥 观看完整的 PDQ 部署教程

The video's package-creation section shows this build live, including EXE, MSI and PowerShell deployments — the perfect companion while you package your office's odd application.

▶️ Watch Full Video
❓ 常见问题

如何找到无人记录的安装程序的静默开关?

工作方法:检查供应商站点,用 /? 询问安装程序or /help, identify the installer family from the file properties and use that family's standard switches, then test on a single machine while watching for windows.这四个步骤之一几乎可以满足所有安装人员的要求。

我的 EXE 手动安装正常,但部署挂起。为什么?

几乎总是无形的提示。安装程序正在等待无人能看到的会话中的输入。 Re-run it by hand with your chosen switches and watch: if any window, licence page or reboot question appears, the switch set is wrong or the installer needs a response file (InstallShield) or a different parameter.

自定义包应使用哪些成功代码?

从 0 开始,然后添加 3010(已安装,需要重新启动)和 1641(已安装,重新启动开始)。 Many good installers return those instead of 0, and without them PDQ reports a successful install as a failure, which poisons your deployment history and any retry logic built on it.

本指南基于技术安数 PDQ 部署教程视频 • 被某个步骤卡住了?在视频评论中提问 — 你会得到回复🙏