Accessing REG_BINARY data in the registry 
Author Message
 Accessing REG_BINARY data in the registry

I have a problem accessing data in the registry with type "REG_BINARY".

If there is only one byte in the data I can read and write this data to and
from the registry. To have access to more than one byte after RegRead, I found a
solution in an other thread.
The following code fragment works for reading and checking the data :

val = WSHShell.RegRead( .. key with REG_BINARY data ...)
for each v in val
  msgbox "Contens of v : " + CStr(v)
next

But write to the registry fails every time with "type mismatch" code 800A000D. The
contens of variable "val" is the data read in the above RegRead request. The data is
completly read which can be verified with the msgbox in the "for each" loop.

WSHShell.RegWrite ".. key with REG_BINARY data ", val, "REG_BINARY"

If I put the data directly in the code the write works, but only for some few values. If
the entered value is to long or to big ? (for example &H1234567890) results in an VB
Syntax error.

WSHShell.RegWrite ".. key with REG_BINARY data ", &H01, "REG_BINARY"

Any idea to solve this and to write REG_BINARY data directly from an VB variable to the
registry ?

--

Best regards
Udo Frormann



Sun, 09 Dec 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. REG_BINARY data in the registry

2. Writing REG_BINARY values to the Registry

3. Can't update the registry with REG_BINARY value

4. RegWrite & REG_BINARY data

5. Read Registry Keys and Trees / API Call for Registry access

6. Using RecordSets within Access 2000 Data Access Pages

7. Registry data in Outlook agent

8. Detect registry data's repertory

9. Reading perf data from registry help

10. Read data from DB, write to registry via VBscript

11. Reading Binary data from the registry

12. Binary registry data to Jscript Array?

 

 
Powered by phpBB® Forum Software