Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Using ValueGet method, how do I retrieve from the registry a data value when the name shows (Default)?

0
Posted

Using ValueGet method, how do I retrieve from the registry a data value when the name shows (Default)?

0

The registry consists of keys and values. Each value has a name and a value. Keys have a name and a default value. This default value is the same as a normal value. You can access the default value by opening the key and using an empty string to get the default value of the key. On Error Resume Next THBReg.KeyOpen , “HKEY_CLASSES_ROOT\.txt” If Err.Number = 0 Then Dim var As Variant var = THBReg.ValueGet(“”) … End If I use THBRegistry for some straightforward registry read, create, delete operations. Running the program as an administrator it works fine ( ditto on a win 95 machine and also a win 2000 machine ). When I log in to the NT PC as a user, the program comes up with the error \’Error -2147352567 KeyCreate: Access is denied\’ When you use the KeyCreate method of THBRegistry you will use the default security access mask and this is thbSAM_KEY_ALL_ACCESS. Maybe the user account doesn\’t have enough rights on the registry key to use ALL_ACCESS Therefore always try to use the \’low

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123