The Data-value can be a REG_SZ, so you don't have to work with hex values. I tried to make it a REG_MULTI_SZ (to have multiple lines), but it just put all the lines on one line I think you're better off with a predefined file if you want to have multiple lines. Edit1: btw, you don't need the NullFile-value in there. It will show up in the New-list anyway if you just put in the Data- or FileName-value. Edit2: I'd still go for the predefined file. If you use the Data-value, it will add a character (not sure what character, it shows up as a space in Notepad) to the end of your string.