pnpunattendpnpunattend

审核计算机上的设备驱动程序,执行无人参与的驱动程序安装,或者在不安装的情况下搜索驱动程序,还可以在命令行中报告结果。Audits a computer for device drivers, and perform unattended driver installations, or search for drivers without installing and, optionally, report the results to the command line. 使用此命令为特定硬件设备指定特定驱动程序的安装。Use this command to specify the installation of specific drivers for specific hardware devices.

先决条件Prerequisites

旧版本的 Windows 操作系统需要进行初步准备。Preliminary preparation is required for older versions of the Windows operating system. 在使用此命令之前,必须完成以下任务:Prior to using this command, you must complete the following tasks:

  1. 为要安装的驱动程序创建一个目录。Create a directory for the drivers you want to install. 例如,在 C:\Drivers\Video 中为视频适配器驱动程序创建一个文件夹。For example, create a folder at C:\Drivers\Video for video adapter drivers.

  2. 下载并提取设备的驱动程序包。Download and extract the driver package for your device. 将包含操作系统版本 INF 文件的子文件夹的内容复制到所创建的视频文件夹中的所有子文件夹。Copy the contents of the subfolder that contains the INF file for your version of the operating system and any subfolders to the video folder that you created. 例如,将视频驱动程序文件复制到 C:\Drivers\VideoFor example, copy the video driver files to C:\Drivers\Video.

  3. 将系统环境路径变量添加到步骤1中创建的文件夹。例如, C:\Drivers\VideoAdd a system environment path variable to the folder you created in step 1.For example, C:\Drivers\Video.

  4. 创建以下注册表项,然后为创建的 DriverPaths 键将 值数据 设置为 1Create the following registry key, and then for the DriverPaths key you create, set the Value Data to 1.

  5. 对于 Windows®7导航注册表路径: **HKEY_LOCAL_Machine \Software\microsoft\windows NT\CurrentVersion \ **,然后创建密钥: **UnattendSettings\PnPUnattend\DriverPaths \ **For Windows® 7 navigate the registry path: HKEY_LOCAL_Machine\Software\Microsoft\Windows NT\CurrentVersion\, and then create the keys: UnattendSettings\PnPUnattend\DriverPaths\

语法Syntax

PnPUnattend.exe auditsystem [/help] [/?] [/h] [/s] [/l]

参数Parameters

参数Parameter 说明Description
auditsystemauditsystem 指定联机驱动程序安装。Specifies online driver install.

必需,但在运行此命令时,无论是 /help 还是 /?Required, except when this command is run with either the /help or /? 个参数。parameters.

/s/s 可选。Optional. 指定在不安装的情况下搜索驱动程序。Specifies to search for drivers without installing.
/l/l 可选。Optional. 指定在命令提示符中显示此命令的日志信息。Specifies to display the log information for this command in the command prompt.
/? | /help 可选。Optional. 在命令提示符下显示此命令的帮助。Displays help for this command at the command prompt.

示例Examples

若要命令显示如何使用 PNPUnattend.exe 审核计算机的可能的驱动程序更新,然后将发现结果报告给命令提示符,请键入:To command shows how to use the PNPUnattend.exe to audit a computer for possible driver updates, and then report the findings to the command prompt, type:

pnpunattend auditsystem /s /l

其他参考Additional References