Archive: Write registry


How to write registry like this?

[HKEY_CURRENT_USER\Software\ArchiveViewer]
"Level"=dword:00011000
[HKEY_CURRENT_USER\Software\ArchiveViewer]
"exec"=hex:02,08,00,00

Thanks very much


WriteRegStr HKCU "Software\ArchiveViewer" "Level" "dword:00011000"

WriteRegStr HKCU "Software\ArchiveViewer" "exec" "hex:02,08,00,00"

or

WriteRegStr HKEY_CURRENT_USER "Software\ArchiveViewer" "Level" "dword:00011000"

WriteRegStr HKEY_CURRENT_USER "Software\ArchiveViewer" "exec" "hex:02,08,00,00"


Hrm ... I think that those aren't strings but dwords and raw data.

Look at the other WriteRegBleh functions. Same idea.


Kaboon, I have try the codes you give.It finished compile, but it was different from the original registry.
Edgewise, when I change WriteRegStr to WriteRegBleh, NSIS showed "invalid command" message.
What wrong about it?


Uh-oh, we have a literalist.

Check the documentation that came with NSIS for the appropriate WriteReg.... functions to use, there are several with slightly different names depending on what kind of data you want to write.


Thanks, Edgewize!
I have finished
[HKEY_CURRENT_USER\Software\ArchiveViewer]
"exec"=hex:02,08,00,00
But
[HKEY_CURRENT_USER\Software\ArchiveViewer]
"Level"=dword:00011000
was unfinished
I have try
WriteRegDword HKCU "Software\ArchiveViewer" "Level" "00011000"
but it cannot be compile
What's wrong?