Windows device driver installation and management tool.
This little self-contained, no-dependency tool can be built either as a console application or a Windows application which has no visible window (ideal to use in combination with setup makers). It offers a command-line-based driver (un-)installer and allows for simple manipulation of class filter entries. Run nefconc.exe --help
to see all the options offered.
Windows Device Driver management is and always has been hard. The APIs involved are old, moody and come with pitfalls. Historically the devcon
tool or nowadays pnputil
have been used to offload these tedious tasks, but unintuitive and sparsely documented command line arguments and error propagation make them poor candidates for automation in e.g. setup engines. Grown tired of these limitations I made this "devcon clone" available under a permissive license which offers the following highlighted features and more:
- Allows for true window-less execution
- Actively suppresses and works around user interaction inconsistencies ("reboot required" dialogs and OS-included bugs)
- Offers optional logging to
stdout
or file - Sane command line arguments 😁
- Class filter values manipulation
- Supports installation of primitive drivers
Binaries are available to download in the releases page, just download and extract. However, if you are using a package manager, you can use one of the following options:
This is a community-maintained source and might lag behind GitHub releases.
nefcon
is available in the Extras bucket:
scoop bucket add extras
scoop install nefcon
This is a community-maintained source and might lag behind GitHub releases.
nefcon
is available in the winget-pkgs repository:
winget install nefcon
For a console example use nefconc
, for windowless execution use nefconw
binary.
nefconw --install-driver --inf-path "Path\To\Inf.inf"
nefconw --uninstall-driver --inf-path "Path\To\Inf.inf"
nefconw --add-class-filter --position upper --service-name HidHide --class-guid 745a17a0-74d3-11d0-b6fe-00a0c90f57da
nefconw --create-device-node --hardware-id root\HidHide --class-name System --class-guid 4D36E97D-E325-11CE-BFC1-08002BE10318
nefconw --remove-device-node --hardware-id root\HidHide --class-guid 4D36E97D-E325-11CE-BFC1-08002BE10318
nefconw --inf-default-install --inf-path "F:\Downloads\btrfs-1.8\btrfs.inf"
Currently the devcon install INFfile HardwareID
command is implemented so you can use nefcon
as a drop-in replacement for this popular software node device driver installation command! The /r
flag to auto-reboot is not supported; check the exit code to determine if a reboot is required and inform the user to do so whenever convenient.
This project uses the following 3rd party resources:
- Argh! A minimalist argument handler
- Scoped coloring of Windows console output
- Convenient high-level C++ wrappers around Windows Registry Win32 APIs
- Single header C++ logging library
- Microsoft Detours
- A modern C++ scope guard that is easy to use but hard to misuse
- Windows Implementation Libraries (WIL)
- My opinionated collection of C++ utilities
- Replacing Device Console (DevCon.exe)
- PnPUtil
- DevCon Install