G
Guest
I am trying to access the registry from a normal user by the following code
.... but failed!! However, it works under admin user logon.
I think I need to grant some access right to the normal user, but I don't
know how! Can anyone give me a hand please?
Many Thanks!! ^_^
' ---- Code start
Private Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOp ...
Private Declare Function RegQueryValueEx Lib "advapi32.dll" Alias "Re ...
nRet = RegOpenKeyEx(HKEY_LOCAL_MACHINE, Section, 0&, KEY_ALL_ACCESS, hKey)
If nRet = ERROR_SUCCESS Then
nRet = RegQueryValueEx(hKey, key, 0&, nType, ByVal Buffer, nBytes)
End If
.... but failed!! However, it works under admin user logon.
I think I need to grant some access right to the normal user, but I don't
know how! Can anyone give me a hand please?
Many Thanks!! ^_^
' ---- Code start
Private Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOp ...
Private Declare Function RegQueryValueEx Lib "advapi32.dll" Alias "Re ...
nRet = RegOpenKeyEx(HKEY_LOCAL_MACHINE, Section, 0&, KEY_ALL_ACCESS, hKey)
If nRet = ERROR_SUCCESS Then
nRet = RegQueryValueEx(hKey, key, 0&, nType, ByVal Buffer, nBytes)
End If