How to patch a driver to run on older versions of Windows
Aug 12, 2023 12:46:10 GMT -8
Post by Jevil7452 on Aug 12, 2023 12:46:10 GMT -8
NOTE: This will not work for every driver. Try at your own risk
This guide focuses more on getting drivers to work on older versions of Windows 10, not older versions of Windows in general. Mentions of "older versions" are older versions of Windows 10.
Also, sorry if you can't understand something here, but I'm not really good at writing guides. But you can make a message and I'll try to explain.
Sometimes, when installing device drivers, you might notice they don't work on an older version. Sometimes it's because they actually don't work, but sometimes it's because the driver was made to not install on older versions of Windows by the means of the INF file.
In this post, I'll show how to patch a driver that's been made to not work on older versions because of such an INF file.
Firstly, I'll show how you can tell the driver has been made to not install on older versions of Windows
Open the INF in Notepad, and search for "10.0"
You might see something like this:
If you see something like this, this means the driver is not made to not install on older versions. If you get an issue with it, it's for some other reason.
(if you use older versions of Windows, you could try changing all references of NTamd64.10.0 to NTamd64.6.3 (for 8.1 for example))
But, if you see something like this:
Then it means that the driver will not install under that specific build of Windows 10. (In this case, build 16273)
By changing the build number to be the build you're currently using, it'll let you install the driver, but it might not work sometimes.
So, to change the build number you should replace ALL mentions of NTamd64.10.0...16273 with NTamd64.10.0...17134 (example, replace the 2 build numbers with your own ones)
After that, save the .inf file. Note that doing this will invalidate the signature, so to install the driver you will need either to boot with Disable Driver Signature Enforcement or Test Mode. I personally do Test Mode. (Note. Test Mode won't work with Secure Boot on)
The command to run in CMD as admin for Test Mode is:
bcdedit /set {CURRENT} testsigning on
After running that, reboot the PC and you'll be in Test Mode, as indicated by the watermarkNOTE: It seems that you won't be able to turn off Test Mode after installing the driver, but from a quick Google search it seems that someone's unsigned driver was working just fine when they turned off Test Mode.
After booting into either Test Mode or Disable Driver Signature Enforcement, install the driver.
In case the regular installer fails, you can install it using the command
pnputil /add-driver *.inf /subdirs /install
in the driver's main folder
You will get this message:
Click Install this driver software anyway
(Sometimes, even the setup programs might have version checks you'll either need to bypass or skip the setup program entirely and use pnputil)
I have confirmed this to work for Intel Smart Sound Technology on version 1803 (17134) - the driver officially runs on 1809 and up as stated by the INF and Intel Graphics Driver for version 1703 (15063) - the driver officially runs on 1709 and up as stated by the INF
Notes for GPU driver
1. Even though it installs in 1607, it only gives a black screen after installing. However, it means that the OS at least recognizes the driver, as 1511 doesn't install it at all.
2. For the GPU driver, after running the pnputil command to install it, I needed to go to the Device Manager, select the GPU, and update it's driver, and select the Intel patched driver.
Screenshots of it working:
Intel Smart Sound Technology:
I don't have one for the GPU driver.
Also, if you would want to batch patch INF files, you can do that with grepWin
Set it to Regex Search mode.
In the Search for: field enter
\b10\.0\.\.\.\d{5}\b
In the Replace with/Capture format: field enter10.0...17134
(Replace 17134 with your version number)Set Search in field to be the root of the folder with the drivers
Set File Names match: to text mode and enter *.inf in there
Click "Replace" and you'll have patched driver INFs you can install.