I am trying to read a registry entry in under Local machine from a xla. If UAC is high the funcion RegOpenKeyEx fails to read registry. Is there any way to get the permission(via code).
rc = RegOpenKeyEx(KeyRoot, KeyName, 0, KEY_ALL_ACCESS, hKey)
KeyRoot is HKEY_LOCAL_MACHINE
KeyName is “SOFTWARE\XYZ”
Note: My code works without any issue – When UAC is low.
OS : Win 7,
Office : Tested in 2007 and 2010 – both had teh same issue.
Thanks chris neilsen,
I used KEY_READ access prievilage as mentioned in this site.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724878%28v=vs.85%29.aspx