Re: Registry setting. How to set ValueData with quotation marks inside?

30 views
Skip to first unread message

Gavin Lambert

unread,
Jun 4, 2021, 3:29:59 AMJun 4
to inno...@googlegroups.com
On 4/06/2021 1:04 am, 'Bekudio Ich' wrote:
> I want to set a Windows registry key.
> This is nomally easy.
> My Problem is, that I need ValueData with quotation marks inside.
>
> This is what I want to set:
>
> Quotation mark as value.png
> How the syntax must be to get this?
> This will *not* work:
> ValueData: "C:\Program Files (x86)\MD5 FC 2.0\MD5 FC.exe" "%1"

Same way you do quotes everywhere else:

ValueData: """C:\Program Files (x86)\MD5 FC 2.0\MD5 FC.exe"" ""%1"""

Having said that, you should never be hard-coding the path to Program
Files. Use {app}, or use {reg:...} or {code:...} to look up the path of
a different application, or at the very least use {pf}.

Bekudio Ich

unread,
Jun 4, 2021, 9:32:42 AMJun 4
to innosetup
Thanks Gavin,

this works perfect!!

And I followed your additional hint(never hard-coding the path)
The running result is now:
ValueData: """{app}\MD5 FC.exe"" ""%1"""

BR, Bernie
Reply all
Reply to author
Forward
0 new messages