Are there WinAPI functions that do the same what can do standard Windows utility reg.exe
with import/export flags?
I'm know that there are RegSaveKey
and RegRestoreKey
functions, but the calling process must have additional privileges SE_RESTORE_NAME
and SE_BACKUP_NAME
. This means that it is necessary to ask user to elevate process (show UAC dialog).
Seems to be that reg.exe
does not require such privileges for HKCU keys. But starting reg.exe
with some arguments is not good idea if there are appropriate WinAPI.
UPD: Brief reverse engineering has shown that reg.exe
use internal parse functions.
Still may be are there .NET functions that does not require additional privileges?