Skip to content
⌘ NSIS Forum Archive

Escaping curly brackets in WriteRegStr

2 posts

acheton#

Escaping curly brackets in WriteRegStr

Hi all,

I am using NSIS2.46 and I am trying to write a value to a registry key using WriteRegStr. However the registry key has to have curly brackets within the value, so an example might be as follows:

WriteRegStr HKLM "Software\etc" "CommLinks" "TCPIP{server=www.something.com;port=23231;}"

Whilst the install compiles and runs ok the value which ends up being written is:

TCPIP{}

Which I am guessing is because the curly brackets need escaping. I can see the \ is normally used for this but I cannot get it to work. Is anyone able to help please?

thanks


Ach
Brummelchen#
your example works like charm here, is written and read out works also.

is it possible that you post some code around it? maybe you try to write a variable within brackets and that may cause mismatch cause ${} is used by !define in the nsis configurations