devcon устанавливает драйвер
В качестве данных на вход ему подсовывается inf файл. inf файл - это ВСЕ. Там прописываются все компоненты драйвера , все, все, все.
Сразу коды возврата , т.е. ERRORLEVEL:
0 Success
1 Requires reboot
2 Failure
3 Syntax error
devcon.exe install C:\WinDDK\7600.16385.1\src\serial\serial\objchk_win7_amd64\amd64\serial.inf *PNP0500
devcon.exe install C:\WinDDK\7600.16385.1\src\serial\VirtualSerial\objchk_win7_amd64\amd64\virtualserial.inf UMDF\VirtualSerial
так не проходит
devcon.exe install C:\DEVELOPMENT\DRIVERS\mydrv1\objchk_win7_amd64\amd64\drv1.sys
C:\Win10-drv-src\serial\VirtualSerial\ComPort\Debug\virtualserial>devcon help
Device Console Help:
devcon [-r] [-m:\\] [...]
-r Reboots the system only when a restart or reboot is required.
Specifies a remote computer.
Specifies a Devcon command (see command list below).
... One or more arguments that modify a command.
For help with a specific command, type: devcon help
classfilter Add, delete, and reorder class filters.
classes List all device setup classes.
disable Disable devices.
driverfiles List installed driver files for devices.
drivernodes List driver nodes of devices.
enable Enable devices.
find Find devices.
findall Find devices, including those that are not currently attached.
help Display Devcon help.
hwids List hardware IDs of devices.
install Install a device manually.
listclass List all devices in a setup class.
reboot Reboot the local computer.
remove Remove devices.
rescan Scan for new hardware.
resources List hardware resources for devices.
restart Restart devices.
sethwid Modify Hardware ID's of listed root-enumerated devices.
stack List expected driver stack for devices.
status List running status of devices.
update Update a device manually.
updateni Manually update a device (non interactive).
dp_add Adds (installs) a third-party (OEM) driver package.
dp_delete Deletes a third-party (OEM) driver package.
dp_enum Lists the third-party (OEM) driver packages installed on this machine.
Примеры :
devcon.exe help status
devcon.exe status *
devcon.exe classes
devcon hwids *
devcon hwids *ACPI
devcon find *port*
devcon find *
devcon hwids *Virtual*
ROOT\PORTS\0000
Name: PuertoDeLena COM-TCP (COM34)
Hardware IDs:
UMDF\VirtualSerialTcp
1 matching device(s) found.
devcon find *virtual*
ROOT\PORTS\0000 : PuertoDeLena COM-TCP (COM34)
1 matching device(s) found.
devcon classes (именно эти имена надо передавать в функцию SetupDiClassGuidsFromNameEx , например Ports)
Listing 61 setup classes.
WCEUSBS :
USB : USB
Media Center Extender: Media Center
PnpPrinters : IEEE 1394 SCSI-
Dot4 : IEEE 1284.4
Dot4Print : IEEE 1284.4
CDROM : DVD CD-ROM
Computer :
DiskDrive :
Display :
fdc :
hdc : IDE ATA/ATAPI
Keyboard :
MEDIA : ,
Modem :
Monitor :
Mouse :
MTD :
MultiFunction :
Net :
NetClient :
NetService :
NetTrans :
PCMCIA : PCMCIA
Ports : (COM LPT)
Printer :
SCSIAdapter :
System :
Unknown :
FloppyDisk :
Processor :
MultiPortSerial :
Memory :
SmartCardReader : -
Sensor :
VolumeSnapshot :
BiometricDevice :
1394 : - IEEE 1394
Infrared : -
Image :
TapeDrive :
Volume :
Battery :
HIDClass : HID (Human Interface Devices)
Sample : Sample Device
61883 : 61883
STLinkWinUSB : Universal Serial Bus devices
LegacyDriver :
SmartCard : -
SideShow : Windows SideShow
SDHost : -
Transfer Cable :
AVC : AVC
MediumChanger :
SBP2 : SBP2 IEEE 1394
XnaComposite : (Microsoft) Windows
SecurityDevices :
SmartCardFilter : -
CNCPorts : com0com - serial port emulators
Bluetooth : Bluetooth
WPD :