General discussion

Locked

VB, Registry on NT, 2000

By amwalsh ·
I am having trouble saving to the registry on win NT, 2000. I need to save to the HKEY_LOCAL_MACHINE key so I can't use VB's
SaveSetting, I need to use the API. The following code worked on 9x:

RegCreateKeyEx HKEY_LOCAL_MACHINE,
"Software\" & AppName" & "\" & key, 0, 0, 0, KEY_ALL_ACCESS, vbNull, hKey, lDummy)

RegSetValueEx hKey, "Left", 0, 1, ByVal sL, Len(sL)


I think it's permission issue, but can't get it to work on NT, 2000.

Thanks
Mike Walsh
mikew@augdev.com

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

VB, Registry on NT, 2000

by malcolm.sargeant In reply to VB, Registry on NT, 2000

I guess you need administrator level security access

Collapse -

VB, Registry on NT, 2000

by amwalsh In reply to VB, Registry on NT, 2000

The question was auto-closed by TechRepublic

Collapse -

VB, Registry on NT, 2000

by brenlee1 In reply to VB, Registry on NT, 2000

You are right Mike, it is a permission issue. NT will not allow you to set any keys in the HKEY_LOCAL_MACHINE unless you have administrative access.

You can, however, write to HKEY_CURRENT_USER on both Win 9x/NT/2000.

Collapse -

VB, Registry on NT, 2000

by amwalsh In reply to VB, Registry on NT, 2000

The question was auto-closed by TechRepublic

Collapse -

VB, Registry on NT, 2000

by amwalsh In reply to VB, Registry on NT, 2000

This question was auto closed due to inactivity

Back to Web Development Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums