[Bug 16875] New: .NET 3.0: WIC installer fails due to bug(s) in setupapi.SetupGetTargetPathW

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Jan 11 03:56:39 CST 2009


http://bugs.winehq.org/show_bug.cgi?id=16875

           Summary: .NET 3.0: WIC installer fails due to bug(s) in
                    setupapi.SetupGetTargetPathW
           Product: Wine
           Version: 1.1.12
          Platform: Other
               URL: http://www.microsoft.com/downloads/details.aspx?FamilyID
                    =10cc340b-f857-4a14-83f5-25634c3bf043
        OS/Version: other
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: setupapi
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: focht at gmx.net


Hello,

prerequisite: 

1. clean WINEPREFIX
2. download .NET 3.0 Framework installer from: http://download.microsoft.com
/download/4/d/a/4da3a5fa-ee6a-42b8-8bfa-ea5c4a458a7d/dotnetfx3setup.exe
(sha1sum: 
a566bcd2ffffc3842a95adc57f7df3f8cd11577f)
3. export _SFX_CAB_SHUTDOWN_REQUEST=1 (workaround, see bug 9158)
4. wine ./dotnetfx3setup.exe

It might take a while until all required packages are downloaded using BITS.

Note: If you need to redo steps, backup the directory "dotnetfx304506.30" from
"c:\\windows\\temp" to a different location, remove ~/.wine, copy
"dotnetfx304506.30" again to "c:\\windows\\temp" to prevent BITS from
downloading over and over again.

After accepting EULA, the installer will exit due to error.

"c:\\windows\\temp\\dd_dotnetfx3error.txt":

--- snip ---
...
[01/11/09,09:51:04] WIC Installer: [2] Error code 1603 for this component means
"ERROR_INSTALL_FAILURE
"
[01/11/09,09:51:04] WIC Installer: [2] Setup Failed on component WIC Installer
[01/11/09,09:51:12] WapUI: [2] DepCheck indicates WIC Installer is not
installed.
--- snip ---

"c:\\windows\\temp\\dd_WIC.txt":

--- snip ---
[dd_WIC.txt]
0.082:
================================================================================
0.084: 2009/01/11 09:51:04.229 (local)
0.084: C:\f93da2af7072de7f1485\update\update.exe (version 6.3.4.0)
0.085: Hotfix started with following command line: /quiet /norestart
/log:C:\windows\temp\dd_WIC.txt 
0.085: GetKernelType: GetInternalFilename failed
0.085: In Function GetBuildType, line 1170, RegOpenKeyEx failed with error 0x2
0.098: Unexpected Error While Executing Line 1 ( Test.WindowsCodecsVer.Section
) of PreRequisite 
0.098: WIC Setup canceled.
0.098: Update.exe extended error code = 0xf00d
0.098: Update.exe return code was masked to 0x643 for MSI custom action
compliance.
--- snip ---

Relevant trace log from WIC installer, run manually:

--- snip ---
...
0023:Call setupapi.SetupFindFirstLineW(00148740,0033ba3c
L"Test.WindowsCodecsVer.Section",00000000,0033b5e0) ret=0107ee9e
0023:trace:setupapi:SetupFindFirstLineW
(0x148740,L"Test.WindowsCodecsVer.Section",(null)): returning 12/0
0023:Ret  setupapi.SetupFindFirstLineW() retval=00000001 ret=0107ee9e
0023:Call setupapi.SetupFindNextLine(0033b5e0,0033b5d0) ret=0107eeb0
0023:Call KERNEL32.SetLastError(00000000) ret=6ead0fab
0023:Ret  KERNEL32.SetLastError() retval=00000000 ret=6ead0fab
0023:Ret  setupapi.SetupFindNextLine() retval=00000001 ret=0107eeb0
0023:Call
setupapi.SetupGetStringFieldW(0033b5e0,00000000,0033b3a8,00000104,0033b190)
ret=0107eaec
0023:Call KERNEL32.SetLastError(00000000) ret=6ead1ad4
0023:Ret  KERNEL32.SetLastError() retval=00000000 ret=6ead1ad4
0023:trace:setupapi:SetupGetStringFieldW context 0x148740/0x148740/12/0 index 0
returning L"NotPresentOp"
0023:Ret  setupapi.SetupGetStringFieldW() retval=00000001 ret=0107eaec
..
0023:Call
setupapi.SetupGetStringFieldW(0033b5e0,00000001,0033b1a0,00000104,0033b190)
ret=0107ec3b
0023:Call KERNEL32.SetLastError(00000000) ret=6ead1ad4
0023:Ret  KERNEL32.SetLastError() retval=00000000 ret=6ead1ad4
0023:trace:setupapi:SetupGetStringFieldW context 0x148740/0x148740/12/0 index 1
returning L"CheckFilever"
0023:Ret  setupapi.SetupGetStringFieldW() retval=00000001 ret=0107ec3b
...
0023:Call
setupapi.SetupGetStringFieldW(0033b5e0,00000002,0033ae4c,00000104,0033a72c)
ret=0107d377
0023:Call KERNEL32.SetLastError(00000000) ret=6ead1ad4
0023:Ret  KERNEL32.SetLastError() retval=00000000 ret=6ead1ad4
0023:trace:setupapi:SetupGetStringFieldW context 0x148740/0x148740/12/0 index 2
returning L"CopyAlways.System32.Files"
0023:Ret  setupapi.SetupGetStringFieldW() retval=00000001 ret=0107d377
0023:Call setupapi.SetupGetTargetPathW(00148740,00000000,0033ae4c
L"CopyAlways.System32.Files",0033a730,00000104,0033a72c) ret=0107d3a9
0023:trace:setupapi:SetupGetTargetPathW 0x148740, (nil),
L"CopyAlways.System32.Files", 0x33a730, 0x00000104, 0x33a72c
0023:Call KERNEL32.SetLastError(00000000) ret=6ead0de6
0023:Ret  KERNEL32.SetLastError() retval=00000000 ret=6ead0de6
0023:trace:setupapi:SetupFindFirstLineW
(0x148740,L"CopyAlways.System32.Files",(null)): returning 8/0
0023:trace:setupapi:SetupFindNextMatchLineW
(0x148740,L"DestinationDirs",L"DefaultDestDir"): not found
0023:Call KERNEL32.SetLastError(e0000102) ret=6ead14bb
0023:Ret  KERNEL32.SetLastError() retval=e0000102 ret=6ead14bb
0023:Ret  setupapi.SetupGetTargetPathW() retval=00000000 ret=0107d3a9
0023:Call KERNEL32.GetLastError() ret=010701ae
0023:Ret  KERNEL32.GetLastError() retval=e0000102 ret=010701ae 
--- snip ---

Relevant snippet from: "update_winxp.inf"

--- snip ---
[Test.WindowsCodecsVer.Section]
    NotPresentOp=CheckFilever,CopyAlways.System32.Files,WindowsCodecs.dll
...
[DestinationDirs]
    CopyAlways.System32.files=11  ; %windir%\system32 (don't delay until
reboot)
--- snip ---

If you override updspapi.dll to native, you see the target path resolution
working:

--- snip ---
001b:CALL
UPDSPAPI.UpdSpGetTargetPathW(0014e450,00000000,0033ae4c,0033a730,00000104,0033a72c)
ret=0107d3a9
001b:Call ntdll.wcslen(0033ae4c L"CopyAlways.System32.Files") ret=0046a14c
001b:Ret  ntdll.wcslen() retval=00000019 ret=0046a14c
001b:Call ntdll.RtlAllocateHeap(00110000,00000000,00000034) ret=0046a07b
001b:Ret  ntdll.RtlAllocateHeap() retval=00151148 ret=0046a07b
001b:Call ntdll.wcscpy(00151148,0033ae4c L"CopyAlways.System32.Files")
ret=0046a16b
001b:Ret  ntdll.wcscpy() retval=00151148 ret=0046a16b
001b:Call msvcrt._abnormal_termination() ret=0046a186
001b:fixme:seh:_abnormal_termination (void)stub
001b:Ret  msvcrt._abnormal_termination() retval=00000000 ret=0046a186
001b:Call KERNEL32.WaitForMultipleObjects(00000002,0014e6c4,00000000,ffffffff)
ret=00457d36
001b:Ret  KERNEL32.WaitForMultipleObjects() retval=00000001 ret=00457d36
001b:Call KERNEL32.lstrcpynW(0033a21c,00452804 L"DestinationDirs",000000ff)
ret=00460f5b
001b:Ret  KERNEL32.lstrcpynW() retval=0033a21c ret=00460f5b
001b:Call user32.CharLowerW(0033a21c L"DestinationDirs") ret=0046995a
001b:Ret  user32.CharLowerW() retval=0033a21c ret=0046995a
001b:Call KERNEL32.CompareStringW(00000409,00000001,0033a21c
L"destinationdirs",ffffffff,006516f0 L"destinationdirs",ffffffff) ret=00469a4b
001b:Ret  KERNEL32.CompareStringW() retval=00000002 ret=00469a4b
001b:Call KERNEL32.lstrcpynW(0033a014,00151148
L"CopyAlways.System32.Files",000001ff) ret=00461002
001b:Ret  KERNEL32.lstrcpynW() retval=0033a014 ret=00461002
001b:Call user32.CharLowerW(0033a014 L"CopyAlways.System32.Files") ret=0046995a
001b:Ret  user32.CharLowerW() retval=0033a014 ret=0046995a
001b:Call KERNEL32.CompareStringW(00000409,00000001,0033a014
L"copyalways.system32.files",ffffffff,0066bd34
L"CLSID\\{22C21F93-7DDB-411C-9B17-C5B7BD064ABC}\\Containers",ffffffff)
ret=00469a4b
001b:Ret  KERNEL32.CompareStringW() retval=00000003 ret=00469a4b
001b:Call KERNEL32.CompareStringW(00000409,00000001,0033a014
L"copyalways.system32.files",ffffffff,00651714
L"copyalways.system32.files",ffffffff) ret=00469a4b
001b:Ret  KERNEL32.CompareStringW() retval=00000002 ret=00469a4b
001b:Call ntdll.wcstoul(0065174c L"11",0033a1d4,0000000a) ret=0045d673
001b:Ret  ntdll.wcstoul() retval=0000000b ret=0045d673
...
001b:Call KERNEL32.lstrcpyW(0033a730,0033a4c8 L"C:\\windows\\system32")
ret=0045e8e1
001b:Ret  KERNEL32.lstrcpyW() retval=0033a730 ret=0045e8e1
001b:Call ntdll.RtlFreeHeap(00110000,00000000,00151148) ret=0046a0fd
001b:Ret  ntdll.RtlFreeHeap() retval=00000001 ret=0046a0fd
001b:Call KERNEL32.SetLastError(00000000) ret=0045e909
001b:Ret  KERNEL32.SetLastError() retval=00000000 ret=0045e909
001b:RET  UPDSPAPI.UpdSpGetTargetPathW() retval=00000001 ret=0107d3a9
--- snip ---

Well, actually there are more bugs in this API than this specific case.

For instance the IE7 installer suffers from another bug in SetupGetTargetPathW
API if you don't use Hans Leidekkers "iecustom" fake dll patch
(http://bugs.winehq.org/show_bug.cgi?id=12690#c17) which just
short-circuits/skips/hides various setupapi/updspapi deficencies (string
tables, dynamic strings/replacements, target path resolution).
Hint: "CheckFileVer" op with directory target (ex: "System32.Files") which is
not present in "DestinationDirs" section and no default destination dir (->
fallback must be used). You can find many examples of such .inf files.

Regards


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list