Read Registry on Windows 7 with VBA Permission

前端 未结 1 809
甜味超标
甜味超标 2021-01-27 20:42

I have a line of code that has worked flawlessly for years on 50+ PCs (Vista & Windows 7 32 & 64 bit) in Access 2007 and Access 2010.

    RegStr = fRetur         


        
1条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-27 21:08

    One possible cause of issues like this is the registry virtualization that Microsoft added to Windows starting with Vista. When UAC (User Account Control) is enabled in Windows, non-privileged users can still "modify" system-wide settings like HKEY_LOCAL_MACHINE registry values, but those changes are "virtualized" for that user only and other users cannot see them.

    In this case, one user may have run an application which saved settings to HKEY_LOCAL_MACHINE. That user will be able to retrieve those settings and run the application as normal, but another user won't be able to see those HKEY_LOCAL_MACHINE settings because they are only visible to the user that created them.

    0 讨论(0)
提交回复
热议问题