I am trying to manipulate the registry from VBA code in Microsoft Access 2013 under Windows 7, 32-bit. I don't have a problem in HKCU, but in HKLM I receive an error.
Set ChangeReg = CreateObject("WScript.Shell")
ChangeReg.RegWrite "HKLM\MyNewKey\", 1, "REG_DWORD"
...throws run-time error: Invalid root in registry key "HKLM\MyNewKey\".
I am guessing this is security-related, and I would like to get around it without causing the user to need to click on a UAC dialog box or anything like that, if possible. Suggestions? Thanks.