![]() |
#1 |
Senior Member
Join Date: Jul 2008
Posts: 157
|
![]()
This Microsoft article describes the syntax of .reg files:
http://support.microsoft.com/kb/310516 In there you can find the following table: code: Which suggests that a hex(2) value in a .reg file should be "translated" to a WriteRegExpandStr in NSIS. Do I understand correctly? If so, how would one write a value of "hex(2):25,00,53,00,79,00,73,00,74,00,65,00" in a WriteRegExpandStr line? Thanks. |
![]() |
![]() |
![]() |
#2 |
Senior Member
Join Date: Oct 2007
Location: Shanghai, China
Posts: 207
|
To write an expand string, write what you see in registry editor but not the .reg file. This was clearly expressed in NSIS manual.
WriteRegExpandStr HKCU Environment TEMP '%USERPROFILE%\Local Settings\Temp' To write a binary string, like this: "Config"=hex:01,23,45,67,89,ab,cd,ef Using: WriteRegBin HKCU 'Sofeware\MyProgram' Config 0123456789abcdef To read a multi-string, see http://nsis.sourceforge.net/REG_MULTI_SZ_Reader, or use the Registry plug-in to read and write all kinds of registry value. |
![]() |
![]() |
![]() |
#3 | |
Senior Member
Join Date: Jul 2008
Posts: 157
|
![]()
Thank you very much. Your reply was very informative and helpful (hopefully to others down the road, too).
Quote:
Of course I searched the NSIS manual before I posted this question, but even after your answer I am still unable to find any reference to "write what you see in registry editor but not the .reg file". Which version are you using? (mine is v2.45). |
|
![]() |
![]() |
![]() |
#4 |
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
jiake was not referring to the quote "write what you see in registry editor but not the .reg file" but to the example WriteRegExpandStr usage.
Stu |
![]() |
![]() |
![]() |
#5 | |
Senior Member
Join Date: Jul 2008
Posts: 157
|
![]() Quote:
![]() |
|
![]() |
![]() |
![]() |
#6 |
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
How about the fact that the example has the string being written in plain text (and without double backstrokes - which is another mistake people make)? Or am I missing something?
Stu |
![]() |
![]() |
![]() |
|
Tags |
.reg, hex(2), writeregbin, writeregexpandstr |
Thread Tools | Search this Thread |
Display Modes | |
|
|