I was just about to tell you not to touch DriverStore, because that’s reserved for the operating system itself, but I see there are now instructions on how to do exactly that. Go figure.
Personally, I always used tools like pnputil to preinstall into DriverStore folder and then install from DriverStore into system32/drivers. That always seemed quite clean to me. Even when I used NSIS to create my installers, I’d always defer to DIFX to do the actual installation.
If i was writing something from scratch today. I’d have a WiX installer writing the sys,inf and cat to disk in C:\Program Files\MeThen a custom action to execute pnputil on the inf. I’d have my inf install to the DriverStore as per: Driver Package Isolation - Windows drivers | Microsoft Learn
I would avoid wix Difx plugin. I am 90% sure it does not support DIRID13
For the newest driver that I’m working on, I place the .sys, .inf & .cat in the product directory via my WiX installer, and then I have a custom action calling a utility .exe that I wrote which makes use of the SetupDi API functions to install the driver into the Driver Store or remove it. The .exe also takes care of all other tasks related to user-mode & driver services, such as creating/deleting/stopping a service, telling the Filter Manager to load/unload a driver, etc. This has all been working reliably, and is coded to support down-level as far back as Windows Server 2019 on through to Windows Server 2025 24H2 and Windows 11 24H2+.