Build & Sign
NDIS DriverBuild and sign the NDIS filter driver for installation.
Administrator Required
The signing script temporarily changes the system clock to sign with an expired certificate. This requires Administrator privileges and will briefly affect system time.
Prerequisites
- • Visual Studio 2022 with C++ workload
- • Windows Driver Kit (WDK) matching your VS version
- • Test signing enabled —
bcdedit /set testsigning on - • Administrator privileges
Build the Driver
The signing script handles both building and signing:
# Debug build (default)
.\sign_with_pfx.ps1
# Release build
.\sign_with_pfx.ps1 -Configuration ReleaseWhat the Script Does
- 1Builds the driver using MSBuild
- 2Saves the current system time
- 3Sets system time to certificate validity period
- 4Signs the .sys and .cat files with the PFX certificate
- 5Restores the original system time
Output Files
After successful build and signing:
x64/Debug/ ├── dioips_ndis.sys # Signed driver binary ├── dioips_ndis.inf # Installation INF file └── dioips_ndis.cat # Signed catalog file
Install the Driver
:: Copy files to application directory
copy x64\Debug\dioips_ndis.sys .
copy x64\Debug\dioips_ndis.inf .
copy x64\Debug\dioips_ndis.cat .
:: Install via netcfg (run as Administrator)
netcfg -l dioips_ndis.inf -c s -i DioIPSNdisUninstall the Driver
:: Uninstall via netcfg (run as Administrator)
netcfg -u DioIPSNdisTroubleshooting
Error 0xe000022f
Third-party INF lacks digital signature. Ensure the .cat file is properly signed and test signing is enabled.
Build fails
Ensure WDK is installed and matches your Visual Studio version. Run from Developer Command Prompt.
Time sync issues
Disable Windows Time service temporarily if it interferes with the clock change during signing.