msi: Correctly parse double quotes in the token value.

This fixes an installer that passes to InstallProduct a command line like
PROPERTY1="Installing ""Product name"" version 8.0" PROPERTY2=1 PROPERTY3=1
In this case properties PROPERTY2 and PROPERTY3 were not recognized and that
led to an installation failure when a custom action didn't see them as set.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
oldstable
Dmitry Timoshkov 2015-10-06 18:10:35 +08:00 committed by Alexandre Julliard
parent 1b3087e79f
commit 42caac841e
2 changed files with 2 additions and 4 deletions

View File

@ -245,7 +245,7 @@ static int parse_prop( const WCHAR *str, WCHAR *value, int *quotes )
{
case '"':
state = state_quote;
if (in_quotes) count--;
if (in_quotes && p[1] != '\"') count--;
else count++;
break;
case ' ':
@ -329,7 +329,7 @@ UINT msi_parse_command_line( MSIPACKAGE *package, LPCWSTR szCommandLine,
ptr2 = strchrW( ptr, '=' );
if (!ptr2) return ERROR_INVALID_COMMAND_LINE;
len = ptr2 - ptr;
if (!len) return ERROR_INVALID_COMMAND_LINE;

View File

@ -4718,9 +4718,7 @@ static void test_propcase(void)
r = MsiInstallProductA(msifile, "BLAHBLAH=\"Copyright \"\"My Company\"\" 2015\" MyProp=42");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
todo_wine
ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n");
todo_wine
ok(delete_pf("msitest", FALSE), "Directory not created\n");
error: