I have .net solution which generates build in X86(as target Platform).
I am expecting below mentioned registry key entry should be created under
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\ FolderName, But it creates entry under Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node which is not expected here.
If I change .net solution as X64(Build Target Platform), then it creates under “local machine\Software”

Microsoft.Win32.RegistryKey subKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE");
if (checkIfKeyExists(subKey))
{
subKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\\FolderName");
if (!checkIfKeyExists(subKey))
{
Microsoft.Win32.Registry.LocalMachine.CreateSubKey("SOFTWARE\\ FolderName ");
Microsoft.Win32.Registry.LocalMachine.SetValue("TestKey", "456788", RegistryValueKind.String);
}
}