On Saturday 10 July 2004 20:15, Mike McCormack wrote:
> Consider adding "msi" = "native, builtin" to your Wine configuration
> files, and not installing the MSI redistributables straight away when
> you encounter an installer that uses msi.dll :) Let us know what bugs
> that turns up.
When I do this:
WINEDEBUG="trace+msi" WINEDLLOVERRIDES="msi=b" wine msiexec /i tippfix.msi
msi seems to loop endlessly. These are the first lines of the trace. Notice
the second line showing a single space command line string:
trace:msi:MsiSetInternalUI 00000005 (nil)
trace:msi:MsiInstallProductA "tippfix.msi" " "
fixme:msi:MsiInstallProductW L"tippfix.msi" L" "
trace:msi:MsiVerifyPackageW L"tippfix.msi"
trace:msi:MsiOpenDatabaseW L"tippfix.msi" (null) 0x197fe6ac
trace:msi:MSI_OpenDatabaseW L"tippfix.msi" (null)
Later, when the command line is searched for property/value pairs, the trace
shows this:
trace:msi:ACTION_DoTopLevelINSTALL Looking at L" "
trace:msi:ACTION_DoTopLevelINSTALL Found commandline property (L"\ffff\ffff") =
(L"\deb0\197f\5ce6\1aa0\0f00\4fcc\87c7
\1aa0\dea4\197fC\197f\87ec\1aa0\dea4\197f")
trace:msi:MSI_SetPropertyW Setting property (L"\ffff\ffff"
L"\deb0\197f\5ce6\1aa0\0f00\4fcc\87c7\1aa0\dea4\197fC\197f\
87ec\1aa0\dea4\197f")
trace:msi:MSI_DatabaseOpenViewW L"select Value from _Property where
_Property=`\ffff\ffff`" 0x197fcbc8
Clear signs of uninitialised memory being used. The patch below fixes this
and also strips any leading whitespace off the property name.
-Hans
Changelog:
Fix command line parsing.
Index: dlls/msi/action.c
===================================================================
RCS file: /home/wine/wine/dlls/msi/action.c,v
retrieving revision 1.28
diff -u -r1.28 action.c
--- dlls/msi/action.c 9 Jul 2004 22:58:27 -0000 1.28
+++ dlls/msi/action.c 12 Jul 2004 12:46:35 -0000
@@ -581,7 +581,7 @@
{
LPWSTR ptr,ptr2;
ptr = (LPWSTR)szCommandLine;
-
+
while (*ptr)
{
WCHAR prop[0x100];
@@ -594,6 +594,8 @@
{
BOOL quote=FALSE;
DWORD len = 0;
+
+ while (*ptr == ' ') ptr++;
strncpyW(prop,ptr,ptr2-ptr);
prop[ptr2-ptr]=0;
ptr2++;
@@ -615,12 +617,13 @@
strncpyW(val,ptr2,len);
val[len]=0;
- if (*ptr)
- ptr++;
- }
- TRACE("Found commandline property (%s) = (%s)\n", debugstr_w(prop),
- debugstr_w(val));
- MSI_SetPropertyW(package,prop,val);
+ if (strlenW(prop) > 0)
+ {
+ TRACE("Found commandline property (%s) = (%s)\n", debugstr_w(prop), debugstr_w(val));
+ MSI_SetPropertyW(package,prop,val);
+ }
+ }
+ ptr++;
}
}