README.md (9762B) | Rendered
1 # Driver Updater 2 3 Finds newer drivers for the hardware in a Windows PC and installs them. It checks Windows Update, then asks NVIDIA, AMD, and Intel directly. It updates only the drivers already in use and installs the driver alone, the way Device Manager's "Update driver" does. No vendor setup program runs and no vendor software gets installed. 4 5 ## Requirements 6 7 - Windows 10 or 11, 64 bit. 8 - Admin rights. The app asks for them at startup because installing drivers and creating restore points both need them. 9 - 7-Zip, only for AMD chipset drivers. Without it the chipset row says to install it, and everything else still works. 10 - The .NET 10 SDK to build. The published exe runs without .NET installed. 11 - To build the installer: nothing extra. `dotnet build` fetches the WiX 7 SDK from NuGet. The project accepts the WiX 7 EULA in `installer/DriverUpdater.Installer.wixproj`. Its maintenance fee applies only above US$10,000 a year in revenue. 12 13 The app has no NuGet dependencies. WMI and Windows Update are COM objects called through `dynamic`. 14 15 ## Download 16 17 The installer is the Download link on https://dittus.dev/git/driver-updater/. It installs to `C:\Program Files\Driver Updater` and adds a Start Menu shortcut. Remove it from Settings, Apps. 18 19 The MSI isn't code signed, so Windows SmartScreen warns before it runs. Choose More info, then Run anyway. 20 21 ## Build and run 22 23 From the repo folder in an elevated terminal: 24 25 ```powershell 26 dotnet run 27 ``` 28 29 From a normal terminal, `dotnet run` fails with "The requested operation requires elevation". Build it and start the exe instead. Windows shows the UAC prompt. 30 31 ```powershell 32 dotnet build 33 start bin\Debug\net10.0-windows\DriverUpdater.exe 34 ``` 35 36 To build one exe that carries the .NET runtime (about 62 MB): 37 38 ```powershell 39 dotnet publish -c Release 40 ``` 41 42 It lands in `bin\Release\net10.0-windows\win-x64\publish\DriverUpdater.exe`. 43 44 From WSL, run the same commands with `dotnet.exe` so the Windows SDK does the build. 45 46 ## Build the installer 47 48 The installer wraps the published exe, so publish first: 49 50 ```powershell 51 dotnet publish -c Release 52 dotnet build installer -c Release 53 ``` 54 55 The MSI lands in `installer\bin\Release\DriverUpdater.msi`. It takes its version from the exe, so `<Version>` in `DriverUpdater.csproj` is the only place to change it. Never change the `UpgradeCode` in `installer/Package.wxs`. A newer MSI uses it to find and replace the installed copy. 56 57 Windows Installer can't write its database to the WSL share, so from WSL point the installer's build folders at a Windows path: 58 59 ```bash 60 dotnet.exe build installer -c Release \ 61 '-p:BaseIntermediateOutputPath=C:\Temp\DriverUpdater-msi\obj\' \ 62 '-p:OutputPath=C:\Temp\DriverUpdater-msi\out\' 63 ``` 64 65 Without that, the build fails with `WIX0223: Failed to open database`. 66 67 ## Where updates come from 68 69 | Source | Devices | Lookup | Installs | 70 |---|---|---|---| 71 | Windows Update | Anything Microsoft has a driver for | Windows Update Agent API, searching Microsoft's servers for `Type='Driver'` | Yes | 72 | NVIDIA | GeForce GPUs | `getDispDrvrByDevid` on `gfwsl.geforce.com`, keyed by PCI device ID | Yes | 73 | AMD graphics | Radeon GPUs and Ryzen integrated graphics | `drivers.amd.com/drivers/installer/json/version.json` and the feeds it lists | Yes | 74 | AMD chipset | Devices already on an AMD chipset driver | `drivers.amd.com/drivers/installer/chipset/VersionInfo.xml`, then the INFs in the package | Yes, with 7-Zip | 75 | Intel | Graphics, wireless, and Ethernet | The Intel Driver & Support Assistant catalog at `dsadata.intel.com/data/en` | No. Rows link to Intel's page | 76 77 Each vendor endpoint is the one that vendor's own update tool calls. None of them is documented. Any of them can change without notice. AMD's server needs an amd.com `Referer`. Intel's needs a `User-Agent`. The app sends both. 78 79 Intel is check only because Intel packs graphics, Wi-Fi, and Bluetooth drivers in three different installer formats. Unpacking each needs its own code, and that needs Intel hardware to test on. 80 81 ## How it installs 82 83 Windows Update drivers download and install silently through the Windows Update Agent API. 84 85 Vendor drivers go through five steps: 86 87 1. **Download.** The vendor's package goes to `%TEMP%\DriverUpdater`. A dropped download is retried twice. 88 2. **Signature.** `WinVerifyTrust` checks the Authenticode signature, revocation included. The signer has to be `NVIDIA Corporation` or `Advanced Micro Devices` to match the source. If either check fails, the file is deleted. 89 3. **Unpack.** NVIDIA's and AMD's graphics packages are 7z archives, which the `tar.exe` built into Windows reads. AMD's chipset package is an NSIS installer holding an InstallShield setup. 7-Zip opens the NSIS layer. The InstallShield layer unpacks itself through an MSI administrative install, which copies files out and installs nothing. AMD's own installer unpacks it the same way. 90 4. **Find the INF.** The app looks for the INF that lists the device's most specific hardware ID, then its compatible IDs. IDs that only name a device class are skipped. 91 5. **Install.** `UpdateDriverForPlugAndPlayDevices` installs that INF on the device with no UI and waits for it to finish. Windows replaces the driver only if it ranks the new one higher, so this never downgrades. The driver store checks the package's own signature. 92 93 Graphics packages unpack to 2 to 4 GB, so they're deleted after the install. The chipset package stays in `%LOCALAPPDATA%\DriverUpdater`, one folder per AMD release, because every scan reads it. 94 95 Before installing anything, the app creates a System Restore point. Clear the checkbox to skip it. 96 97 ## How versions are compared 98 99 Each vendor numbers drivers differently from Windows. 100 101 - **NVIDIA:** Windows shows driver 610.88 as `32.0.16.1088`. The app joins the last two fields, keeps the last five digits, and compares the result with NVIDIA's version. 102 - **AMD graphics:** the Windows version doesn't map cleanly to Adrenalin releases. The app reads AMD's internal build (`25.10.42`) from `ReleaseVersion` in the GPU's driver registry key. The display INF writes that value, so it stays right after a driver only install. The Available column shows both numbers, as in `26.10.1 (25.10.45)`. 103 - **AMD chipset:** each device is compared the way Windows ranks drivers. An INF that matches an earlier ID in the device's list wins. On a tie, the newer date wins, then the higher version. `MatchingDeviceId` in the driver key says which ID the installed driver matched. Only devices whose current driver comes from AMD are compared. 104 - **Intel:** the Windows driver version against the catalog's component version. 105 - **Windows Update:** the API has no version field. Available shows the version from the end of the update title when there is one. 106 107 ## When something fails 108 109 | What you see | Cause | Fix | 110 |---|---|---| 111 | `Windows Update error 0x80240044` | The app isn't running as admin | Start it through UAC | 112 | `Windows Update error 0x8024402C` | Windows Update can't reach Microsoft | Check the network and proxy | 113 | `Couldn't create a restore point` | System Protection is off for the system drive | Turn it on in System Properties, or clear the checkbox | 114 | A row like `NVIDIA check` with `Failed: ...` | The vendor changed or blocked its endpoint, or doesn't know the device | The status shows the full error | 115 | `The download isn't signed by ..., so it was deleted` | The download's signature is invalid or belongs to someone else | Get the driver from the vendor's site | 116 | `tar.exe failed` or `7z.exe failed` | The vendor changed its package format | The status shows the tool's error | 117 | `Nothing in the package matches this device` | The package has no INF listing any of the device's IDs | The vendor dropped the device, or the feed picked the wrong package | 118 | `Windows kept the current driver` | Windows ranks the installed driver as good or better | Nothing to do | 119 | `Install 7-Zip to check these` | AMD chipset drivers need 7-Zip to unpack | Install 7-Zip and scan again | 120 121 Windows quietly skips a restore point if it made one in the last 24 hours. The app counts that as success. 122 123 ## Limits 124 125 - Only the GPU itself gets the new graphics driver. The GPU's HDMI audio device keeps its current driver. 126 - AMD Software, the Adrenalin app, stays at its old version after a driver only install. It can warn that it doesn't match the driver. 127 - The NVIDIA lookup asks for the Game Ready driver. Someone on the Studio driver gets offered Game Ready. The version number doesn't say which one is installed. 128 - AMD PRO drivers for workstation cards aren't checked. 129 - A chipset scan runs AMD's signed InstallShield setup in administrative mode to unpack a new release, before anything is selected. It installs nothing. 130 131 ## Files 132 133 | File | What it does | 134 |---|---| 135 | `MainWindow.xaml`, `MainWindow.xaml.cs` | The window, the scan, and the install loop | 136 | `InstalledDevices.cs` | Reads devices, driver versions, and device IDs from WMI | 137 | `WindowsUpdate.cs` | Searches, downloads, and installs through the Windows Update Agent API | 138 | `Nvidia.cs`, `Amd.cs`, `Intel.cs` | One vendor check each | 139 | `VendorPackage.cs` | Downloads, verifies, and unpacks a vendor package once for every row that needs it | 140 | `Unpack.cs` | Runs `tar.exe`, 7-Zip, and other unpacking tools | 141 | `DriverInf.cs` | Finds the INF for a device and ranks it against the installed driver | 142 | `PnpDriver.cs` | Installs an INF through `UpdateDriverForPlugAndPlayDevices` | 143 | `Authenticode.cs` | The signature check | 144 | `RestorePoint.cs` | Creates the restore point through WMI | 145 | `DriverUpdate.cs` | One row in the list | 146 | `Com.cs`, `Web.cs` | COM object creation and the shared `HttpClient` | 147 | `installer/` | The WiX project that builds the MSI around the published exe |