Como alterar o driver do dispositivo via script

1

Temos uma imagem padrão do Windows 7 que contém muitos drivers de dispositivos diferentes. Como resultado, dois drivers compatíveis para uma placa de rede são encontrados, mas um dos dois resulta em um problema. Agora temos uma instrução para os nossos funcionários de montagem para selecionar o driver correto através do gerenciador de dispositivos.

Existe uma maneira de alterar o driver de dispositivo via linha de comando para que eu possa fazer o script?

    
por bas 17.10.2017 / 21:02

1 resposta

1

Existe uma maneira de alterar o driver do dispositivo via linha de comando?

Existem duas possibilidades, pnputil e devcon :

Generally speaking, the best tool to manage device drivers is “Device Manager”. That is a GUI snap-in for Microsoft Management Console (MMC Jump ). You can start it by launching devmgmt.msc. But that's not an option in some specific cases, namely:

  • Scripting.
  • Windows Server installed in Server Core option.

Microsoft provides two such tools that differ both in their capabilities and availability.

Plug-and-Play (PnP) Utility (PNPUtil.exe)

Basic Features:

  • List drivers - PNPUTIL.EXE -e
  • Add driver.
  • Install driver.
  • Remove driver.

Pros:

  • Included out of the box with all current Windows versions.
  • Syntax complexity is medium.

Cons:

  • Does not provide advanced functionality such as:
    • Disable device.
    • Select one specific driver for a specific device from the list of compatible drivers that are currently installed in the system.

Availability:

  • Inbox with all current Windows versions.

More information:

  • For a detailed description, comprehensive list of features, syntax and command-line examples please see official documentation at PnPUtil.

Device Console (DevCon.exe)

Features (also Pros):

  • All device and driver management functionality that can be found in Device Management MMC including advanced functionality such as:
    • Disable device.
    • Select one specific driver for a specific device from the list of compatible drivers that are currently installed in the system.

Cons:

  • Not available out-of-the box.
  • Syntax complexity is high.

Availability:

  • See How to Obtain the Current Version of Device Console Utility (DevCon.exe) for detailed instructions.

More information:

  • For a detailed description, comprehensive list of features, syntax and command-line examples please see official documentation at DevCon.

Fonte Como Gerenciar drivers de dispositivos com a linha de comando

    
por 17.10.2017 / 21:14