Search code examples
registrynotepad

Writing REG_EXPAND_SZ reg key from notepad


I am trying to write a reg key from notepad and I need to create a REG_EXPAND_SZ value. When I have used this before I have used "" for REG_SZ and dword: for REG_DWORD and so on but I don't know how to write a REG_EXPAND_SZ so I exported an existing value and looked at it in notepad. It came up as hex(2) then loads of hex code that I don't understand! Is this really how you create a expand value in notepad? If it is then how can I convert a string to the format it is using? I did try converting hex to string but it didn't match the original string shown in regedit. Thanks very much!


Solution

  • After a lot of searching and guessing I finally found the answer. The format the text is in is ACSII, convert that to hex and you get the right format for the key. This is the site I used to convert it - http://d21c.com/sookietex/ASCII2HEX.html.