http://bugs.winehq.org/show_bug.cgi?id=16013
--- Comment #10 from Anastasius Focht focht@gmx.net 2009-01-05 05:30:57 --- Hello again,
for the sfc part there is not much to say - the ordinals are simply undocumented. One has to guess the parameter types and return values by +snoop or debugging the installer. Your patch to add exported undocumented ordinals and the stub looks correct. We have to live with this information deficiency so I think it should be accepted as it is.
After applying the sfc patch:
From "c:\windows\KB915865.log":
--- snip --- 6.792: PFE2: Failed to connect to server; error=0x0 --- snip ---
This is most likely due to undocumentd sfc ordinal 3 returning 0, but harmless. The installer looks at return value >0 and might actually do more sfc stuff if connection to "server" succeeds (whatever this means).
--- snip --- 6.795: GetCatVersion: Failed to retrieve version information from C:\windows\system32\CatRoot{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\Tmp.0.KB915865.cat with error 0x57 6.796: GetCatVersion: Failed to retrieve version information from C:\windows\Tmp.0.KB915865.cat with error 0x80092004 6.835: InstallSingleCatalogFile: MyInstallCatalog failed for Tmp.0.KB915865.cat; error=0x000004c7. 6.836: DoInstallation:MyInstallCatalogFiles failed:STR_CATALOG_INSTALL_FAILED 6.836: CleanupTrustedInfFile: GetFileAttributes for C:\windows\system32\CatRoot{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\oem0.cat failed: 0x2 6.859: DeRegistering the Uninstall Program -> KB915865, 0 6.859: Failed to install catalog files. 9.117: Message displayed to the user: Failed to install catalog files. 9.117: User Input: OK 9.118: Update.exe extended error code = 0xf01e 9.118: Update.exe return code was masked to 0x643 for MSI custom action compliance. --- snip ---
So this is essentially the same as in first post from bug report.
The first failure is correct due to KB915865.cat already present in catroot, a temp .cat is created in "C:\windows\Tmp.0.KB915865.cat" on not in "C:\windows\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\Tmp.0.KB915865.cat" where the first try goes.
The second try:
--- snip --- 0035:Call crypt32.CryptSIPRetrieveSubjectGuid(001e84f0 L"C:\windows\Tmp.0.KB915865.cat",00000000,001cad9c) ret=71a7de2c 0035:Call KERNEL32.CreateFileW(001e84f0 L"C:\windows\Tmp.0.KB915865.cat",80000000,00000001,00000000,00000003,00000080,00000000) ret=606b3ae1 0035:Ret KERNEL32.CreateFileW() retval=00000104 ret=606b3ae1 ... 0035:Ret crypt32.CryptSIPRetrieveSubjectGuid() retval=00000001 ret=71a7de2c 0035:Ret wintrust.CryptCATOpen() retval=001cad88 ret=010710c4 0035:Call wintrust.CryptCATGetCatAttrInfo(001cad88,01025430 L"SPAttr") ret=010710f2 0035:fixme:wintrust:CryptCATGetCatAttrInfo 0x1cad88, L"SPAttr" 0035:Call KERNEL32.SetLastError(80092004) ret=71a7ca2e 0035:Ret KERNEL32.SetLastError() retval=80092004 ret=71a7ca2e 0035:Ret wintrust.CryptCATGetCatAttrInfo() retval=00000000 ret=010710f2 ... 0035:Call KERNEL32.MultiByteToWideChar(00000000,00000000,01025388 "GetCatVersion: Failed to retrieve version information from %S with error 0x%lx",ffffffff,00000000,00000000) ret=6c516e1c ... 0035:Call crypt32.CryptSIPRetrieveSubjectGuid(001e84f0 L"C:\windows\Tmp.0.KB915865.cat",00000000,001cad9c) ret=71a7de2c 0035:Call KERNEL32.CreateFileW(001e84f0 L"C:\windows\Tmp.0.KB915865.cat",80000000,00000001,00000000,00000003,00000080,00000000) ret=606b3ae1 0035:Ret KERNEL32.CreateFileW() retval=00000104 ret=606b3ae1 ... 0035:Ret crypt32.CryptSIPRetrieveSubjectGuid() retval=00000001 ret=71a7de2c 0035:Ret wintrust.CryptCATOpen() retval=001cad88 ret=010711c7 0035:Call wintrust.CryptCATGetCatAttrInfo(001cad88,01025440 L"SPLevel") ret=010711ef 0035:fixme:wintrust:CryptCATGetCatAttrInfo 0x1cad88, L"SPLevel" 0035:Call KERNEL32.SetLastError(80092004) ret=71a7ca2e 0035:Ret KERNEL32.SetLastError() retval=80092004 ret=71a7ca2e 0035:Ret wintrust.CryptCATGetCatAttrInfo() retval=00000000 ret=010711ef ... 0035:Call msvcrt._vsnprintf(0033a94b,000007f7,01026ef0 "InstallSingleCatalogFile: MyInstallCatalog failed for %s; error=0x%08lx.",0033b17c) ret=0106b900
--- snip ---
The installer tries to retrieve the catalog version by CryptCATGetCatAttrInfo( .. "SPAttr") and then SP (=service pack version?) by CryptCATGetCatAttrInfo( ... "SPLevel") on both locations. This missing functionality is most likely harmless but might be added one day by crypt component maintainers ;-)
The real problem becomes only visible when on one debugs the installer itself and looks again at trace logs.
From "c:\windows\KB915865.log":
--- snip --- 6.835: InstallSingleCatalogFile: MyInstallCatalog failed for Tmp.0.KB915865.cat; error=0x000004c7. --- snip ---
This error code is set internally, not using any API. At the point of this failure, a function pointer is evaluated (!= NULL). The corresponding function pointer (table) is initialized in very early installer startup phase. Armed with the information gathered from debugging, the trace log reveals:
--- snip --- 0035:Call KERNEL32.LoadLibraryA(0100955c "SetupApi.DLL") ret=01072120 0035:Call PE DLL (proc=0x7c0c89c4,module=0x7c090000 L"setupapi.dll",reason=PROCESS_ATTACH,res=(nil)) ... 0035:Ret PE DLL (proc=0x7c0c89c4,module=0x7c090000 L"setupapi.dll",reason=PROCESS_ATTACH,res=(nil)) retval=1 0035:Ret KERNEL32.LoadLibraryA() retval=7c090000 ret=01072120 0035:Call KERNEL32.GetProcAddress(7c090000,01025de0 "pSetupVerifyCatalogFile") ret=01072150 0035:Ret KERNEL32.GetProcAddress() retval=00000000 ret=01072150 0035:Call KERNEL32.GetProcAddress(7c090000,01025dc8 "pSetupInstallCatalog") ret=01072162 0035:Ret KERNEL32.GetProcAddress() retval=00000000 ret=01072162 0035:Call KERNEL32.GetProcAddress(7c090000,01025db0 "pSetupStringTableEnum") ret=01072174 0035:Ret KERNEL32.GetProcAddress() retval=7c09defc ret=01072174 0035:Call KERNEL32.GetProcAddress(7c090000,01025d94 "pSetupStringTableDestroy") ret=01072186 0035:Ret KERNEL32.GetProcAddress() retval=7c09f508 ret=01072186 ... --- snip ---
The problem is actually "pSetupInstallCatalog" not implemented and to be called later.
Looking at MSDN: http://msdn.microsoft.com/en-us/library/bb432395.aspx
"[This function is no longer supported by Microsoft. Developers should use CryptCATAdminAddCatalog.]"
The prototype puzzles me: there is no separate ansi (A) and unicode (W) version but the params are LPCTSTR which indicates that setupapi.dll itself might be built as ansi or unicode version (Win9x vs NT)?
"This function has no associated import library or header file; you must call it using the LoadLibrary and GetProcAddress functions."
The installer seems the use the API as unicode as the MultiByteToWideChar() calls indicate before (NT). There is also a OS version check and if not NT, InstallCatalog() (ansi) is used.
After adding a simple stub with unicode type params for "pSetupInstallCatalog" to setupapi which just pretends success like InstallCatalog(), one gets further:
--- snip --- 001c:Call setupapi.pSetupInstallCatalog(0033b1a8 L"C:\windows\Tmp.0.KB915865.cat",001b1140 L"Tmp.0.KB915865.cat",00000000) ret=010768d2 001c:fixme:setupapi:pSetupInstallCatalog L"C:\windows\Tmp.0.KB915865.cat", L"Tmp.0.KB915865.cat", (nil) 001c:Ret setupapi.pSetupInstallCatalog() retval=00000000 ret=010768d2 ... --- snip ---
The Xmllite installer finishes successfully (at least it says so) and the log file reveals now:
--- snip --- 5.490: PFE2: Failed to connect to server; error=0x0 5.497: GetCatVersion: Failed to retrieve version information from C:\windows\system32\CatRoot{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\Tmp.0.KB915865.cat with error 0x57 5.504: GetCatVersion: Failed to retrieve version information from C:\windows\Tmp.0.KB915865.cat with error 0x80092004 5.719: ProcessSetupContentSection: PROCESS_SETUP_CONTENT_OP_INSTALL: Copied c:\4dd855c1bd3013aefe8e90e5bf20\update\update_SP2QFE.inf -> c:\windows$hf_mig$\KB915865\update\update_SP2QFE.inf. 5.722: ProcessSetupContentSection: PROCESS_SETUP_CONTENT_OP_INSTALL: Copied c:\4dd855c1bd3013aefe8e90e5bf20\spuninst.exe -> c:\windows$hf_mig$\KB915865\spuninst.exe. 5.723: ProcessSetupContentSection: PROCESS_SETUP_CONTENT_OP_INSTALL: Copied c:\4dd855c1bd3013aefe8e90e5bf20\spmsg.dll -> c:\windows$hf_mig$\KB915865\spmsg.dll. 5.725: ProcessSetupContentSection: PROCESS_SETUP_CONTENT_OP_INSTALL: Copied c:\4dd855c1bd3013aefe8e90e5bf20\update\spcustom.dll -> c:\windows$hf_mig$\KB915865\update\spcustom.dll. 5.727: ProcessSetupContentSection: PROCESS_SETUP_CONTENT_OP_INSTALL: Copied c:\4dd855c1bd3013aefe8e90e5bf20\update\KB915865.CAT -> c:\windows$hf_mig$\KB915865\update\KB915865.CAT. 5.730: ProcessSetupContentSection: PROCESS_SETUP_CONTENT_OP_INSTALL: Copied c:\4dd855c1bd3013aefe8e90e5bf20\update\update.exe -> c:\windows$hf_mig$\KB915865\update\update.exe. 5.733: ProcessSetupContentSection: PROCESS_SETUP_CONTENT_OP_INSTALL: Copied c:\4dd855c1bd3013aefe8e90e5bf20\update\updspapi.dll -> c:\windows$hf_mig$\KB915865\update\updspapi.dll. 5.734: ProcessSetupContentSection: PROCESS_SETUP_CONTENT_OP_INSTALL: Copied c:\4dd855c1bd3013aefe8e90e5bf20\update\update.ver -> c:\windows$hf_mig$\KB915865\update\update.ver. 5.736: ProcessSetupContentSection: PROCESS_SETUP_CONTENT_OP_INSTALL: Copied c:\4dd855c1bd3013aefe8e90e5bf20\update\updatebr.inf -> c:\windows$hf_mig$\KB915865\update\updatebr.inf. 5.738: ProcessSetupContentSection: PROCESS_SETUP_CONTENT_OP_INSTALL: Copied c:\4dd855c1bd3013aefe8e90e5bf20\update\eula.txt -> c:\windows$hf_mig$\KB915865\update\eula.txt. 5.739: ProcessSetupContentSection: PROCESS_SETUP_CONTENT_OP_INSTALL: Copied c:\4dd855c1bd3013aefe8e90e5bf20\update\branches.inf -> c:\windows$hf_mig$\KB915865\update\branches.inf. 5.744: Copied file: C:\windows\system32\xmllite.dll 5.758: Copied file: c:\windows$hf_mig$\KB915865\SP2QFE\xmllite.dll 5.770: DoInstallation: Installing assemblies with source root path: c:\4dd855c1bd3013aefe8e90e5bf20\ 5.770: Num Ticks for Copying files : 702 5.795: Num Ticks for Reg update and deleting 0 size files : 25 5.835: GetCatVersion: Failed to retrieve version information from C:\windows\system32\CatRoot{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\KB915865.cat with error 0x80092004 5.843: GetCatVersion: Failed to retrieve version information from C:\windows\KB915865.cat with error 0x80092004 6.062: DeleteCatalogFile Tmp.0.KB915865.cat failed with ERROR 2 6.064: ---- Old Information In The Registry ------ 6.065: Source:C:\windows$NtUninstallKB915865$\spuninst_000009_.tmp.dll 6.066: Destination: 6.066: Source:C:\windows$NtUninstallKB915865$\spuninst 6.067: Destination: 6.069: Source:C:\windows$NtUninstallKB915865$ 6.070: Destination: 6.072: Source:C:\windows$NtUninstallKB915865$\spuninst_000008_.tmp.dll 6.072: Destination: 6.073: Source:C:\windows$NtUninstallKB915865$\spuninst 6.074: Destination: 6.075: Source:C:\windows$NtUninstallKB915865$ 6.075: Destination: 6.076: ---- New Information In The Registry ------ 6.076: Source:C:\windows$NtUninstallKB915865$\spuninst_000009_.tmp.dll 6.077: Destination: 6.078: Source:C:\windows$NtUninstallKB915865$\spuninst 6.078: Destination: 6.079: Source:C:\windows$NtUninstallKB915865$ 6.080: Destination: 6.082: Source:C:\windows$NtUninstallKB915865$\spuninst_000008_.tmp.dll 6.082: Destination: 6.083: Source:C:\windows$NtUninstallKB915865$\spuninst 6.084: Destination: 6.084: Source:C:\windows$NtUninstallKB915865$ 6.085: Destination: 6.089: UpdateSpUpdSvcInf: Source [ProcessesToRunAfterReboot] section is empty; nothing to do. 6.092: CleanupTrustedInfFile: GetFileAttributes for C:\windows\system32\CatRoot{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\oem0.cat failed: 0x2 --- snip ---
All necessary files seem to get installed. I tested only for Xmllite installer.
Though the installation of IE7 seems questionable .. a lot of native crap might get installed which might cause problems for other stuff (say broken WINEPREFIX).
Regards