I added a registry key value from c#.Net:
using Microsoft.Win32;
string REGISTRY_PATH = @"SOFTWARE\Microsoft\Office\16.0\Excel\Options";
var currentExcelRegistries = Registry.CurrentUser.OpenSubKey(REGISTRY_PATH, true);
currentExcelRegistries.SetValue("OPEN", "Sample.xll");
But when I open the regedit it is not there in the location. I searched the whole registry through find(in regedit) and not able to find anywhere.
I am able to see the key and value when I read back anytime:
Console.WriteLine(currentExcelRegistries.GetValue("OPEN"))
When I try to read in code it is fetching value. When I read all values in the location it gives different set of key value pair, which is totally different from which we see in regedit.
This is impacting my excel by not adding the xll.