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