Commit ba848ac1 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

Fix command line parsing.

parent 9243c96e
...@@ -581,7 +581,7 @@ UINT ACTION_DoTopLevelINSTALL(MSIPACKAGE *package, LPCWSTR szPackagePath, ...@@ -581,7 +581,7 @@ UINT ACTION_DoTopLevelINSTALL(MSIPACKAGE *package, LPCWSTR szPackagePath,
{ {
LPWSTR ptr,ptr2; LPWSTR ptr,ptr2;
ptr = (LPWSTR)szCommandLine; ptr = (LPWSTR)szCommandLine;
while (*ptr) while (*ptr)
{ {
WCHAR prop[0x100]; WCHAR prop[0x100];
...@@ -594,6 +594,8 @@ UINT ACTION_DoTopLevelINSTALL(MSIPACKAGE *package, LPCWSTR szPackagePath, ...@@ -594,6 +594,8 @@ UINT ACTION_DoTopLevelINSTALL(MSIPACKAGE *package, LPCWSTR szPackagePath,
{ {
BOOL quote=FALSE; BOOL quote=FALSE;
DWORD len = 0; DWORD len = 0;
while (*ptr == ' ') ptr++;
strncpyW(prop,ptr,ptr2-ptr); strncpyW(prop,ptr,ptr2-ptr);
prop[ptr2-ptr]=0; prop[ptr2-ptr]=0;
ptr2++; ptr2++;
...@@ -615,12 +617,13 @@ UINT ACTION_DoTopLevelINSTALL(MSIPACKAGE *package, LPCWSTR szPackagePath, ...@@ -615,12 +617,13 @@ UINT ACTION_DoTopLevelINSTALL(MSIPACKAGE *package, LPCWSTR szPackagePath,
strncpyW(val,ptr2,len); strncpyW(val,ptr2,len);
val[len]=0; val[len]=0;
if (*ptr) if (strlenW(prop) > 0)
ptr++; {
} TRACE("Found commandline property (%s) = (%s)\n", debugstr_w(prop), debugstr_w(val));
TRACE("Found commandline property (%s) = (%s)\n", debugstr_w(prop), MSI_SetPropertyW(package,prop,val);
debugstr_w(val)); }
MSI_SetPropertyW(package,prop,val); }
ptr++;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment