├── .gitattributes ├── .gitignore ├── .whitesource ├── Important Note ├── LICENSE ├── README.md ├── Screenshot.jpg ├── files.zip └── unsigned_driver_installerbat /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | .dccache 3 | -------------------------------------------------------------------------------- /.whitesource: -------------------------------------------------------------------------------- 1 | { 2 | "checkRunSettings": { 3 | "vulnerableCheckRunConclusionLevel": "failure" 4 | }, 5 | "issueSettings": { 6 | "minSeverityLevel": "LOW" 7 | } 8 | } -------------------------------------------------------------------------------- /Important Note: -------------------------------------------------------------------------------- 1 | This tool will/might stop working after 01-jan-2040, as the myDrivers.cer will expire on that day, so will have to update the certificates before that to avoid breaking this Tool 2 | Refer this to create new certificate with very long lasting validity: 3 | http://woshub.com/how-to-sign-an-unsigned-driver-for-windows-7-x64/ 4 | 5 | Or generate certificate on the fly by adding appropriate logic in unsigned_driver_installer.bat 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

Unsigned Driver installer Utility for Windows

2 | 3 |

Installs unsigned drivers in windows OS

4 | 5 | ### How to use 6 | 1. Paste the [unsigned_driver_installer.bat](https://github.com/fawazahmed0/windows-unsigned-driver-installer/releases/download/v1.4/unsigned_driver_installer.bat) in driver folder where .inf file is located 7 | 2. Double click the unsigned_driver_installer.bat to install the driver 8 | 9 | ------------ 10 | 11 | **Screenshot:**
12 | ![Tool Screenshot](https://github.com/fawazahmed0/windows-unsigned-driver-installer/raw/master/Screenshot.jpg) 13 | 14 | ------------ 15 | 16 | **Download Link:** [Click Here](https://github.com/fawazahmed0/windows-unsigned-driver-installer/releases/latest/download/unsigned_driver_installer.bat "Click Here") 17 | 18 | ------------ 19 | 20 | **Tested On:** Windows 7, Windows 10 21 | 22 | ------------ 23 | 24 | Please Star this repo by clicking on [:star: button](#) above [:arrow_upper_right:](#) 25 | 26 | -------------------------------------------------------------------------------- /Screenshot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fawazahmed0/windows-unsigned-driver-installer/820eb5e869a6f9268adb9d0fc95a9515ced3e990/Screenshot.jpg -------------------------------------------------------------------------------- /files.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fawazahmed0/windows-unsigned-driver-installer/820eb5e869a6f9268adb9d0fc95a9515ced3e990/files.zip -------------------------------------------------------------------------------- /unsigned_driver_installerbat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | :: Initial message 4 | echo ==================================================== 5 | echo Do not despair of the mercy of God [Quran 39:53] 6 | echo ==================================================== 7 | echo Unsigned Driver Installer Tool For Windows 8 | echo By fawazahmed0 @ GitHub 9 | echo ==================================================== 10 | :: echo. is newline 11 | echo. 12 | 13 | 14 | :: Source: https://stackoverflow.com/questions/23735282/if-not-exist-command-in-batch-file/23736306 15 | :: Check for .inf file exists or not 16 | if not exist *.inf ( 17 | echo Please paste this .bat file in driver folder where .inf file is located 18 | echo Press any key to exit 19 | pause > NUL 20 | exit 21 | ) 22 | 23 | :: Source: https://stackoverflow.com/questions/1894967/how-to-request-administrator-access-inside-a-batch-file 24 | :: Source: https://stackoverflow.com/questions/4051883/batch-script-how-to-check-for-admin-rights 25 | :: batch code to request admin previleges, if no admin previleges 26 | net session >nul 2>&1 27 | if NOT %errorLevel% == 0 ( 28 | powershell -executionpolicy bypass start -verb runas '%0' am_admin & exit /b 29 | ) 30 | 31 | :: Source: https://stackoverflow.com/questions/672693/windows-batch-file-starting-directory-when-run-as-admin 32 | :: Going back to script directory 33 | cd %~dp0 34 | 35 | 36 | :: Source: https://stackoverflow.com/questions/4619088/windows-batch-file-file-download-from-a-url 37 | :: Fetching the binaries required for signing the driver 38 | echo Downloading files required for signing the driver 39 | PowerShell -executionpolicy bypass -Command "(New-Object Net.WebClient).DownloadFile('https://cdn.jsdelivr.net/gh/fawazahmed0/windows-unsigned-driver-installer@master/files.zip', 'files.zip')" 40 | 41 | 42 | :: Source: https://stackoverflow.com/questions/37814037/how-to-unzip-a-zip-file-with-powershell-version-2-0 43 | :: Source: https://www.microsoft.com/en-us/download/details.aspx?id=11800 44 | :: These files were take from Windows Driver Kit Version 7.1.0 45 | :: Extracting the .zip file 46 | PowerShell -executionpolicy bypass -Command "& {$shell_app=new-object -com shell.application; $filename = \"files.zip\"; $zip_file = $shell_app.namespace((Get-Location).Path + \"\$filename\"); $destination = $shell_app.namespace((Get-Location).Path); $destination.Copyhere($zip_file.items());}" 47 | 48 | :: Source: http://woshub.com/how-to-sign-an-unsigned-driver-for-windows-7-x64/ 49 | :: Signing the Drivers 50 | echo Signing the drivers 51 | files\inf2cat.exe /driver:. /os:7_X64 > nul 2>&1 52 | files\inf2cat.exe /driver:. /os:7_X86 > nul 2>&1 53 | files\SignTool.exe sign /f files\myDrivers.pfx /p testabc /t http://timestamp.verisign.com/scripts/timstamp.dll /v *.cat > nul 2>&1 54 | 55 | :: Adding the Certificates 56 | files\CertMgr.exe -add files\myDrivers.cer -s -r localMachine ROOT > nul 2>&1 57 | files\CertMgr.exe -add files\myDrivers.cer -s -r localMachine TRUSTEDPUBLISHER > nul 2>&1 58 | 59 | 60 | :: Source: https://stackoverflow.com/questions/22496847/installing-a-driver-inf-file-from-command-line 61 | :: If the bat file is launched from 32 bit program i.e firefox etc, the cmd will start as 32 bit with directory as syswow64 in 64bit pc. 62 | :: pnputil is not accessible directly from 32 bit cmd and will throw error saying no internal or external command .. 63 | :: In that case, it should be accessed from here %WinDir%\Sysnative\ 64 | :: I assume, the cmd changes to syswow64, after requesting for admin previleges 65 | :: Source: https://stackoverflow.com/questions/8253713/what-is-pnputil-exe-location-in-64bit-systems 66 | :: Source: https://stackoverflow.com/questions/23933888/pnputil-exe-is-not-recognized-as-an-internal-or-external-command 67 | :: Installing Drivers 68 | pnputil -i -a *.inf > nul 2>&1 69 | if NOT %errorLevel% == 0 ( 70 | %WinDir%\Sysnative\pnputil.exe -i -a *.inf > nul 2>&1 71 | ) 72 | 73 | :: Source: https://social.technet.microsoft.com/Forums/en-US/d109719c-ca97-41e1-a529-0113e23ff5b0/deleting-a-certificate-using-certmgrexe?forum=winserversecurity 74 | :: Removing the Certificates 75 | files\CertMgr.exe -del -c -n "Fawaz Ahmed" -s -r localMachine ROOT > nul 2>&1 76 | files\CertMgr.exe -del -c -n "Fawaz Ahmed" -s -r localMachine TrustedPublisher > nul 2>&1 77 | 78 | :: Deleting the temporary items 79 | echo Deleting the temporary files and folders 80 | rmdir /Q /S files > nul 2>&1 81 | del /f files.zip > nul 2>&1 82 | 83 | :: Installation done 84 | echo. 85 | echo Driver Installation complete, press any key to exit 86 | pause > NUL 87 | --------------------------------------------------------------------------------