Page 1 of 1 1
Topic Options
#150168 - 2005-10-18 03:21 PM Writing a Hex key to registry
Darren_W Offline
Hey THIS is FUN
*****

Registered: 2001-10-10
Posts: 208
Loc: Bristol, England
Hi,

I would like to write a hex key to the registry, not sure what identity for the data type to use?

the key exported from the registry looks like this:
Code:
  "LastUsedSource"=hex(2):6e,00,3b,00,31,00,3b,00,5c,00,5c,00,73,00,65,00,72,00,\
76,00,65,00,72,00,5c,00,6e,00,65,00,77,00,6f,00,66,00,66,00,5c,00,00,00



Bye
_________________________
I want to share something with you - the three sentences that will get you through life.
Number 1, 'cover for me.'
Number 2, 'oh, good idea, boss.'
Number 3, 'it was like that when I got here'.

Top
#150169 - 2005-10-18 03:31 PM Re: Writing a Hex key to registry
Darren_W Offline
Hey THIS is FUN
*****

Registered: 2001-10-10
Posts: 208
Loc: Bristol, England
oops sorted it out, didnt need to use the hex
_________________________
I want to share something with you - the three sentences that will get you through life.
Number 1, 'cover for me.'
Number 2, 'oh, good idea, boss.'
Number 3, 'it was like that when I got here'.

Top
#150170 - 2005-10-18 03:36 PM Re: Writing a Hex key to registry
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Just strip-out the commas and junk from the string, and use WriteValue with REG_BINARY like this:

$= WriteValue("key","LastUsedSource", "6e003b0031003b005c005c00730065007200...", "REG_BINARY")

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 373 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.086 seconds in which 0.042 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org