I need to update a registry entry from 1 to 2.
I get a return code of 5 which translates as ERROR_CANTWRITE .
I can update the entry manually without problem but I need it in a setup procedure.
Here is my specific code
Any suggestions?
I get a return code of 5 which translates as ERROR_CANTWRITE .
I can update the entry manually without problem but I need it in a setup procedure.
Here is my specific code
Code:
r = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _
"SOFTWARE\Microsoft\MSSQLServer\MSSQLServer", 0, KEY_READ, hKey)
r = SetValueEx(hKey, "LoginMode", 4, 2)
If r = 0 Then
MsgBox "successful update"
Else
MsgBox "update returned code of " & Str(r)
End If