uwpwindows-10-universalregistrykey

How to access registry key in a UWP app?


I would like to access windows10 registry key by a UWP app. key as: \HKEY_LOCAL_MACHINE\SOFTWARE\MyCompanyName\MyName I can not find any function call to accomplish it. Please indicate me How to do it? Thank you,


Solution

  • You can read registry values from a Win32 runFullTrust background process launched from a UWP application, and you can write values in the HKEY_LOCAL_MACHINE hive from an "elevated" Win32 application launched from that runFullTrust process.

    These techniques are powerful and using them in a UWP app deployed from the Windows Store requires special scrutiny and permission from Microsoft. The techniques are used by OEMs, but not exclusively restricted to them. If you have a good reason and are able to explain it, you're likely to get approval.

    I have written a sample and article that shows exactly how to do this, and you may find it here.