http://bugs.winehq.org/show_bug.cgi?id=8945
--- Comment #33 from Anastasius Focht focht@gmx.net 2008-02-25 13:16:54 ---
Hello,
congrats .. you didn't gave up ;-) I had a similar (one char) patch in place by default initializing wine_unix_to_nt_file_name() prefixW with upper case drive letter ('\','?','?','\','A',':','\'). Although pretty low level change this didn't have any ill effect on apps I regularly use (tested it for some time now).
The installer actually compares both paths returned from GetModuleFileNameW (minus filename part) and GetCurrentDirectoryW as part of instance check. What makes this check somewhat brain damaged is that both paths undergo explicit prettify (PathMakePrettyW, which of course fails for both) and then get memcmp'd (inline). I wonder what they give their devs to smoke ...
The next installer (mshtml/shdocvw) bugs are probably duplicates. I remember it somehow but didn't recover it yet. For the time being one has to use the native override list I posted in previous comment.
BTW ... I wonder why you didn't mentioned/encountered the pretty obvious msi bug before the path bug? Did you install from clean .wine every time? I had to patch msi.MsiSourceListAddSourceW() (from late wine-0.9.56 GIT) to get further ...
--- snip --- 0022:Call msi.MsiSourceListAddSourceW(007f04c0 L"{DFFDDCF5-CB32-4354-8823-1B9E68025953}",00000000,00000000,007f0308 L"Z:\mnt\iso\Adobe CS3") ret=0043342a 0022:trace:msi:MsiSourceListAddSourceW L"{DFFDDCF5-CB32-4354-8823-1B9E68025953}" (null) L"Z:\mnt\iso\Adobe CS3" 0022:Call advapi32.LookupAccountNameW(00000000,00000000,00000000,61bc4eb4,00000000,61bc4eb0,00000000) ret=72dcadd2 0022:fixme:advapi:LookupAccountNameW (null) (null) (nil) 0x61bc4eb4 (nil) 0x61bc4eb0 (nil) - stub --- snip ---
The patch:
--- snip --- diff --git a/dlls/msi/source.c b/dlls/msi/source.c index c373df2..ce57edf 100644 --- a/dlls/msi/source.c +++ b/dlls/msi/source.c @@ -662,10 +662,16 @@ UINT WINAPI MsiSourceListAddSourceW( LPCWSTR szProduct, LPCWSTR szUserName, LPWSTR sidstr = NULL; DWORD sidsize = 0; DWORD domsize = 0; + DWORD dwContext = MSIINSTALLCONTEXT_USERMANAGED;
TRACE("%s %s %s\n", debugstr_w(szProduct), debugstr_w(szUserName), debugstr_w(szSource));
- if (LookupAccountNameW(NULL, szUserName, NULL, &sidsize, NULL, &domsize, NULL)) + if( !szUserName || lstrlenW(szUserName) == 0) + { + /* operate on the per-machine installation */ + dwContext = MSIINSTALLCONTEXT_MACHINE; + } + else if (LookupAccountNameW(NULL, szUserName, NULL, &sidsize, NULL, &domsize, NULL)) { PSID psid = msi_alloc(sidsize);
@@ -676,7 +682,7 @@ UINT WINAPI MsiSourceListAddSourceW( LPCWSTR szProduct, LPCWSTR szUserName, }
ret = MsiSourceListAddSourceExW(szProduct, sidstr, - MSIINSTALLCONTEXT_USERMANAGED, MSISOURCETYPE_NETWORK, szSource, 0); + dwContext, MSISOURCETYPE_NETWORK, szSource, 0);
if (sidstr) LocalFree(sidstr); --- snip ---
Regards