[wpkg-users] Unable to use double-quotes in registry checks

Will Aoki waoki at umnh.utah.edu
Thu Nov 13 20:21:00 CET 2014


I've been working on a package that needs to check a registry value
containing double-quotes. When I include double-quotes inside the value,
I get the error "Unable to add result of check to settings" followed by
details which vary depending on what character follows the quote. Is
anyone aware of a way to do this short of an execute check that uses REG
and FIND?

I've tried this with both the ""foo"" and '"foo"' styles of
inserting literal double-quotes, and I've observed no difference in the
outcome. The examples below use the former because that's what I tested
last.

I validated the syntax of the file with xmllint.

This is the simplest formulation of the problem:

>   <check type="registry" condition="equals" path="HKLM\Software\Microsoft\Windows\CurrentVersion\Run\PaperCutClient" value=""C:\Program Files (x86)\PaperCut MF Client\pc-client.exe" --silent"  architecture="x64" />

which leads to the error:

>   Unable to add result of check to settings: Expected token ']' found 'NAME'.
>
>   check[@type="registry" and @condition="equals" and @path="HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\\PaperCutClient" and @value=""-->C<--:\\Program Files(x86)\\pc-client.exe" --silent" and @architecture="x64"]






This is what I was originally trying to do:

>   <variable name="PKG_EDITION" value="MF" />
>   <variable name="PKG_DESTINATION" value="%PROGRAMFILES(x86)%\PaperCut %PKG_EDITION% Client" architecture="x64" />
>
>   <check type="registry" condition="equals" path="HKLM\Software\Microsoft\Windows\CurrentVersion\Run\PaperCutClient" value=""%PKG_DESTINATION%\pc-client.exe" --silent"  />

This resulted in the error:

>   Unable to add result of check to settings: Unexpected character in query string.
>
>   check[@type="registry" and @condition="equals" and @path="HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\\PaperCutClient" and @value=""-->%<--PKG_DESTINATION%\\pc-client.exe" --silent"]


I tried this to rule out problems with nested variable expansion:

>   <check type="registry" condition="equals" path="HKLM\Software\Microsoft\Windows\CurrentVersion\Run\PaperCutClient" value=""%PROGRAMFILES(x86)%\PaperCut MF Client\pc-client.exe" --silent"  architecture="x64" />

The result was:

>   Unable to add result of check to settings: Unexpected character in query string.
>
>   check[@type="registry" and @condition="equals" and @path="HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\\PaperCutClient" and @value=""-->%<--PKG_DESTINATION%\\pc-client.exe" --silent"]





More information about the wpkg-users mailing list