Windows registry access in UMDF

I need to create registry subkey and set some key values in that from UMDF driver. But access get denied for the driver. Can increase the privilege level of UMDF driver?

which registry keys are your trying to access? in general, the answer is no, but you can adjust the ACL on the registry keys in question to allow your access in some cases. typically, this would be done by an installer - and typically the driver would read those keys assigned by the installer or configuration application rather than creating or writing them. but every case is different

I am trying to do Windows Event Logging method inside UMDF driver. For that it need to create registry key using Win32 API RegCreateKeyEx at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application\.

Your INF can create this key at install time, UMDF drivers do not have write access to the Services key at runtime.

you should never attempt to create this key from within a driver. it should be created by an installer or another UM process. note that you can readily report events from non existant ‘sources’. the source string will be resolved at read time by eventver or another event log reader

1 Like

Thanks a lots!

ok , thanks, i moved the reg creation to installer. That really make sense