Jansemanden
21st August 2002 22:26 UTC
How to add strings containing "" to reg.?
Hi,
Working with an installer I had to add a line to the registry that included "". The line is "C:\Programmer\Winamp\winamp.exe" "%1"
How can I do this?
with this command:
WriteRegStr HKEY_LOCAL_MACHINE "MusePack\shell\Play\command" "" ""C:\Programmer\Winamp\winamp.exe" "%1""
I get the this error:
Error: unterminated string parsing line at C:\Documents and Settings\Jan Stanstrup\Skrivebord\icons\icons.nsi:38
Error in script "C:\Documents and Settings\Jan Stanstrup\Skrivebord\icons\icons.nsi" on line 38 -- aborting creation process
Any help highly more than welcome.
kichik
21st August 2002 22:29 UTC
Just quote it in a single quote.
WriteRegStr HKEY_LOCAL_MACHINE "MusePack\shell\Play\command" \
"" '"C:\Programmer\Winamp\winamp.exe" "%1"'
Please read the documentation first next time.
BTW, it might not be a good idea to hard code the location of Winamp ("C:\Programmer\Winamp\winamp.exe"). Use GetWinampInstPath from functions.htm to get the Winamp path.
Jansemanden
25th August 2002 20:57 UTC
I'm sorry about that...but I did actually read the doc...
Seems like I made another mistake that lead me to believe that what you suggested didn't work...
Which it does now.
Thanks!