HKEY_USERS access Wow6432Node
<p>This is my program where I would like to list:</p>

<blockquote>
  <p>HKEY_USERS/User_SID/<strong>Wow6432Node</strong>/Software/Microsoft/Windows/CurrentVersion/Uninstall/</p>
</blockquote>

<pre><code>#include "pch.h"

void _tmain(int argc, TCHAR* argv[])
{
    try
    {
        HKEY root = HKEY_USERS;
        std::string sid("S-1-5-21-1917061056-2319448781-3348045073-1000");
        std::string subKey(sid + "\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\");
        Poco::Util::WinRegistryKey key(root, subKey, true, KEY_WOW64_32KEY);

        Poco::Util::WinRegistryKey::Keys keys;
        if (key.exists())
        {
            key.subKeys(keys);
        }
    }
    catch (const std::exception&amp; e)
    {
        _tcout &lt;&lt; _T("Error occurred: ") &lt;&lt; e.what() &lt;&lt; std::endl;

        _tostringstream error;
        error &lt;&lt; L"Error: " &lt;&lt; e.what();
        ::MessageBox(NULL, error.str().c_str(), L"Error occurred", MB_ICONERROR);
    }
}
</code></pre>

<p>As far as I know in order to <a href="https://msdn.microsoft.com/ru-ru/library/windows/desktop/aa384129(v=vs.85).aspx" rel="nofollow noreferrer">switch between 64 and 32 registry keys</a> we need to use KEY_WOW64_32KEY and KEY_WOW64_64KEY access mask. So I am using KEY_WOW64_32KEY but my program always lists:</p>

<blockquote>
  <p>HKEY_USERS/User_SID/Software/Microsoft/Windows/CurrentVersion/Uninstall/</p>
</blockquote>

<p>What am I doing wrong?</p>

<p>P.S: If we change HKEY_USERS on HKEY_LOCAL_MACHINE the program will work correctly.</p>