Archive: Strings, Strings, and more Strings


Strings, Strings, and more Strings
Having a bit of trouble setting a string in the registry.

Due to the weird way windows works :D command lines issued with spaces may or may not work. When using switches, they usually never work.

I'm trying to add a key to the registry that installs a service, and the executeable requires a switch to know how to behave. To properly stick this in the registry (with quotes around the path), I have to include double quotes in the string, eg:

"C:\Program Files\..." -service


The "" are part of the string (not added by regedit), and without them it'll b0rk out and die.

I can't seem to figure out how to escape the strings, and if I use single quotes to contain the double quotes (and switch), NSIS can't see the string.

Any ideas?


I tested the following and it works (ie double quotes will be added to the regstring):

WriteRegStr HKLM "Software\probber" "command" '"C:\Program Files\..." -service'

Does this help you?

Good luck,
-Hendri.