[Bug 21906] New: setupapi copyfiles action target must default to LDID_WIN (win9x) or LDID_SYS (NT) when neither DestinationDirs nor DefaultDestDir is given

wine-bugs at winehq.org wine-bugs at winehq.org
Mon Mar 1 15:29:51 CST 2010


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

           Summary: setupapi copyfiles action target must default to
                    LDID_WIN (win9x) or LDID_SYS (NT) when neither
                    DestinationDirs nor DefaultDestDir is given
           Product: Wine
           Version: 1.1.39
          Platform: x86
               URL: http://visiteinteractive.free.fr/VM_java/msjavx86.exe
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: setupapi
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: focht at gmx.net


Hello,

with bug 18097 fixed (extrac32.exe tool), the msjavx86.exe installer still
fails.

WINEDEBUG=+tid,+seh,+relay,+setupapi wine ./msjavx86.exe &> log.txt

Use the "vminst.log" file in system32 to quickly determine which part failed.

--- snip ---
=== INF Invocation ==========================================

Type : RunSetupCommand
INF  : C:\windows\temp\IXP000.TMP\java.inf

00000000 : WFCClean.RunNow
00000000 : CleanUp
00000000 : BaseInstallation.NT5
00000000 : BaseInstallation.RegNow
00000000 : IEOptions.Register
00000000 : IEOptions.X86.Register
00000000 : BaseInstallation.ClassFiles
80004005 : BasePkgMgr.Install.Execute
...
--- snip ---

java.inf -> "BasePkgMgr.Install.Execute" part failed.

--- snip ---
[BasePkgMgr.Install.Execute]
ComponentName=Java
RunPreSetupCommands=BASEINST.ExecPkgMgr
--- snip ---

--- snip ---
[BASEINST.ExecPkgMgr]
rundll32 %11%\msjava.dll,JavaPkgMgr_Install
%10%\Java\classes\classes.zip,1,5,00,%VERNUM%,4,286,%10%\java\classes\classes.cer
rundll32 %11%\msjava.dll,JavaPkgMgr_Install
%10%\Java\trustlib\tclasses.zip,1,5,00,%VERNUM%,6,286,%10%\java\trustlib\tclasses.cer
rundll32 %11%\msjava.dll,JavaPkgMgr_Install
%10%\Java\classes\msjdbc.zip,1,5,00,%VERNUM%,4,286,%10%\java\classes\msjdbc.cer
%11%\jdbgmgr.exe -regserver
--- snip ---

The self-register call fails because there is no target file ("%11%\jdbgmgr.exe
-regserver"):

--- snip ---
001d:Call KERNEL32.CreateProcessW(00000000,0033d22c
L"C:\\windows\\system32\\jdbgmgr.exe
-regserver",00000000,00000000,00000000,04000200,00000000,00152a50
L"C:\\windows\\temp\\IXP000.TMP",0033d18c,0033d1d0) ret=62fee93c
001d:Ret  KERNEL32.CreateProcessW() retval=00000000 ret=62fee93c
--- snip ---

Go back to .inf to look up named sections for the file:

--- snip ---
[BASEINST.SysFilesNoReg]
jdbgmgr.exe,,,33
javart.dll,,,33
msjdbc10.dll,,,33
zonedoff.reg,,,33
zonedon.reg,,,33
...
[BASEINST.SysFilesNoReg.NT5]
clspack.exe,,,33
javart.dll,,,33
jdbgmgr.exe,,,33
jview.exe,,,33
msjdbc10.dll,,,33
wjview.exe,,,33
zonedoff.reg,,,33
zonedon.reg,,,33
--- snip ---

The copy files action is listed here:

--- snip ---
[BaseInstallation]
ComponentName=Java
CheckAdminRights=1
CopyFiles=BASEINST.SysFilesRegister,BASEINST.SysFilesNoReg,BASEINST.WinFiles,BASEINST.INF
AddReg=BASEINST.AddReg

[BaseInstallation.NT5]
ComponentName=Java
CheckAdminRights=1
CopyFiles=BASEINST.SysFilesRegister,BASEINST.SysFilesNoReg.NT5,BASEINST.INF
AddReg=BASEINST.AddReg
--- snip ---

The culprit (BASEINST.SysFilesNoReg.NT5) is here:

--- snip ---
...
001d:trace:setupapi:SetupGetStringFieldW context 0x1526a8/0x1526a8/6/2 index 2
returning L"BASEINST.SysFilesNoReg.NT5"
001d:trace:setupapi:SetupQueueCopySectionW hinf=0x1526a8/0x1526a8
section=L"BASEINST.SysFilesNoReg.NT5" root=L"C:\\windows\\temp\\IXP000.TMP"
001d:Call KERNEL32.SetLastError(00000000) ret=5092b82c
001d:Ret  KERNEL32.SetLastError() retval=00000000 ret=5092b82c
001d:trace:setupapi:SetupFindFirstLineW
(0x1526a8,L"BASEINST.SysFilesNoReg.NT5",(null)): returning 62/0
001d:trace:setupapi:SetupFindNextMatchLineW
(0x1526a8,L"DestinationDirs",L"BASEINST.SysFilesNoReg.NT5"): not found
001d:Call KERNEL32.SetLastError(e0000102) ret=5092bed6
001d:Ret  KERNEL32.SetLastError() retval=e0000102 ret=5092bed6
001d:trace:setupapi:SetupFindNextMatchLineW
(0x1526a8,L"DestinationDirs",L"DefaultDestDir"): not found
001d:Call KERNEL32.SetLastError(e0000102) ret=5092bed6
001d:Ret  KERNEL32.SetLastError() retval=e0000102 ret=5092bed6
001d:Call KERNEL32.SetLastError(00000000) ret=5092c4be
001d:Ret  KERNEL32.SetLastError() retval=00000000 ret=5092c4be
001d:trace:setupapi:SetupGetStringFieldW context 0x1526a8/0x1526a8/6/2 index 3
returning L"BASEINST.INF"
...
--- snip ---

"BASEINST.SysFilesNoReg.NT5" is skipped because there is no "DestinationDirs"
for this named section present (unlike the others BASEINST.SysFilesRegister and
BASEINST.INF):

--- snip ---
[DestinationDirs]
PRECLEAN.RegSvr=11
BASEINST.ClassFiles=10,Java\Classes
BASEINST.TClassFiles=10,Java\TrustLib
BASEINST.SysFilesRegister=11
BASEINST.SysFilesNoReg=11
BASEINST.WinFiles=10
BASEINST.INF=17
--- snip ---

"[DestinationDirs]" -> "DefaultDestDir" is also missing. Because of this the
file is never copied.

http://msdn.microsoft.com/en-us/library/ms794560.aspx (INF CopyFiles Directive)

--- quote ---
If a named section referenced by a CopyFiles directive has a corresponding
entry in the DestinationDirs section of the same INF, that entry explicitly
specifies the target destination directory into which all files that are listed
in the named section are copied. If the named section is not listed in the
DestinationDirs section, Setup uses the DefaultDestDir in the INF file.
...
--- quote ---

And what if no "DefaultDestDir" is given?

I searched a bit and found this:
http://technet.microsoft.com/en-us/library/cc768164.aspx (Appendix C - Windows
98 INF Files)

--- quote ---
The optional DefaultDestDir entry provides a default destination for any
Copyfile entries that use the direct copy notation (@filename) or any
[File-List] section not specified in the [DestinationDirs] section. If
DefaultDestDir is not given, the default directory is set to LDID_WIN.
--- quote ---

LDID_WIN might apply to Win9X but not to Windows NT.
In many .INF files for win32/NT you will find:

--- snip ---
[DestinationDirs]
...
DefaultDestDir = 11 ; LDID_SYS
--- snip ---

So the default for non-existing "DefaultDestDir" on NT is LDID_SYS (as the .inf
references the file(s) as "%11%\<executable>")

You may want to fix dlls/setupapi/queue.c:get_destination_dir().

With this bug is fixed, the installer almost cleanly installs except for bug 
18098 (urlmon.AsyncInstallDistributionUnit not implemented).

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