UMDF2 - Reading driver settings from registry

Is it a right method to enumerate and read config values (driver back-end communication settings) from registry path Computer\HKEY_LOCAL_MACHINE\SOFTWARE\AppName for UMDF2 driver?

Would driver has access rights to read above reg path?

Your driver, like all drivers, has its own registry keys. For a UMDF driver, the Parameters key is in HKLM\Software\Microsoft\Windows NT\CurrentVersion\WUDF\Services\Xxxxx, where Xxxxx is the name of your driver’s service.

https://docs.microsoft.com/en-us/windows-hardware/drivers/wdf/introduction-to-registry-keys-for-drivers

Thanks! I know that there is specific reg entry for driver.

Is it a best practice to read settings from other reg path (reg path of software package which include driver as well).

Not it is not best practice to look at other softwares state. If you want your installed software to configure the driver, the app should either set that state by communicating with the driver at runtime or configuring the driver ah install time.

1 Like