-
b8879d09
by Elizabeth Figura at 2024-08-20T21:36:33+02:00
setupapi: Move INF installation functions to devinst.c.
-
c067b7ef
by Elizabeth Figura at 2024-08-20T21:36:33+02:00
setupapi: Separate a copy_inf() helper.
-
b349035e
by Elizabeth Figura at 2024-08-20T21:36:33+02:00
setupapi: Add an any_version_is_compatible() helper.
-
ec73f59d
by Elizabeth Figura at 2024-08-20T21:36:33+02:00
setupapi: Implement DriverStoreAddDriverPackage().
This patch introduces the bulk of the Driver Store logic.
For some unfathomable reason, Windows driver files are not installed to their
"proper" place until the device is actually plugged in and used. Once that
happens, the INF file in C:/windows/inf/ is used as an installation script.
However, Microsoft also wanted to make it possible for drivers to be installed
before a device is plugged in and used, without putting the onus on the driver
distributor to keep the source files somewhere that the INF will know where to
find them.
Thus the Driver Store was introduced. When an INF is "preinstalled", a "package"
containing the INF, catalog, and any file referenced by the INF is copied to
a location in C:/windows/system32/DriverStore/. The INF itself is then copied
again to C:/windows/inf/ so that it can be probed when a new device is
enumerated, and a PNF is created referencing the driver store location.
The Driver Store attempts to avoid duplication, but also treats any difference
in any file as creating a different driver package.
The Driver Store APIs introduced here are actually completely undocumented. The
Driver Store is normally accessed through one of several apparently higher-level
components, apparently introduced at different points in time, and all with
apparently the same function:
* DriverPackageInstall() et al. from difxapi.dll
* DiInstallDriver() et al. from newdev.dll
* SetupCopyOEMInf() [this not only installs the INF but also implicitly also installs to the driver store]
* The DIFx MSI-based framework, including the DIFxApp.dll redistributable and dpinst.exe
The first three are Windows components, but the last is a redistributable. More
pressingly, DIFxApp.dll is a custom action DLL, which means that MSI will
invariably rename it, so we cannot even in practice substitute a builtin
version.
We cannot easily substitute a builtin dpinst.exe, either, since our current load
order logic always uses a native EXE if specified by path (which in practice is
the case). It's not clear that changing this logic is worthwhile.
-
341f4137
by Elizabeth Figura at 2024-08-20T21:36:38+02:00
setupapi: Implement DriverStoreDeleteDriverPackage().
-
d9296c4c
by Elizabeth Figura at 2024-08-20T21:36:39+02:00
setupapi: Implement DriverStoreFindDriverPackage().
-
f0cfc452
by Elizabeth Figura at 2024-08-20T21:36:40+02:00
setupapi: Uninstall from the driver store in SetupUninstallOEMInf().
-
68e4425e
by Elizabeth Figura at 2024-08-20T21:36:40+02:00
setupapi: Install to the driver store in SetupCopyOEMInf().
-
95c49767
by Elizabeth Figura at 2024-08-20T21:36:40+02:00
setupapi: Add stub spec entries for DriverStoreEnumDriverPackage().
-
7b963df2
by Elizabeth Figura at 2024-08-20T21:36:41+02:00
setupapi/tests: Add Driver Store tests.