Archive: Single quotes in a reg string


Single quotes in a reg string
I am trying to write a reg key but there are single quotes in the variable which will not let me write the string out correctly.

Here is an example.

WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\2970B0FF7E6F72648B02AE0516E722B3\Features" "DictionariesPP" `EAqES@IBg(D%UeACl~AI'N7UcI-C`A25._@IrR`vQuarkXPress`

I am trying to write this and the 4th variable has single quotes and ticks in the string. Is there a way to make it ignore the things within the string.

Pretty much write this out without getting error.
`EAqES@IBg(D%UeACl~AI'N7UcI-C`A25._@IrR`vQuarkXPress`

Thanks in advance


What is exactly the problem? Doesn't your script compile?

See the chapter in the documentation about the script format.


Put double-quotes round the last part, like this

"`EAqES@IBg(D%UeACl~AI'N7UcI-C`A25._@IrR`vQuarkXPress`"


No, it tells me that there are to many variables when it is expecting 4.

That doesn't always work. Some times it thinks that the ' marks make it more than one variable even though i want it as one string.

What i am looking for is a command that will be something that makes NSIS see what is between two things like `something"like"'this'`but it looks at the text in the middle no matter what format and see it as a string. So it would put the text in the registry as

something"like"'this'

I hope this makes sense.


When I tried using "`EAqES@IBg(D%UeACl~AI'N7UcI-C`A25._@IrR`vQuarkXPress`" in a WriteRegStr command,
the installer stored the following in the registry


`EAqES@IBg(D%UeACl~AI'N7UcI-C`A25._@IrR`vQuarkXPress`

I thought that was what you were trying to do


Are you sure that reg value is not of type REG_BINARY? If it is, you must use WriteRegBin.