http://bugs.winehq.org/show_bug.cgi?id=20465
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net Component|-unknown |setupapi Summary|Brothers In Arms Hell's |Brothers In Arms Hell's |Highway : Setup asks for |Highway : Setup asks for |DVD for every .cab file |DVD for every .cab file | |(SetupPromptForDiskA/W | |should only show a dialog | |if the file doesn't exist)
--- Comment #7 from Anastasius Focht focht@gmx.net 2012-05-12 05:48:26 CDT --- Hello,
confirming.
Relevant trace log snippet with builtin:
WINEDEBUG=+tid,+seh,+relay,+setupapi wine "e:\setup.exe" >>log.txt 2>&1
--- snip --- 0025:Call KERNEL32.LoadLibraryExA(00409818 "C:\users\focht\Temp\nsg8f7.tmp\CABSetup.dll",00000000,00000008) ret=00401f92 ... 0025:Ret PE DLL (proc=0x100038c4,module=0x10000000 L"CABSetup.dll",reason=PROCESS_ATTACH,res=(nil)) retval=1 0025:Ret KERNEL32.LoadLibraryExA() retval=10000000 ret=00401f92 ... 0025:Call setupapi.SetupPromptForDiskA(00000000,100046ac "Setup - Files Needed",0019a770 "Disk 1",0064e628 "E:\",0019a668 "main2.cab",00000000,00000308,0064cdd4,00000104,00000000) ret=10002b3b 0025:trace:setupapi:SetupPromptForDiskA (nil), "Setup - Files Needed", "Disk 1", "E:\", "main2.cab", (null), 0x00000308, 0x64cdd4, 260, (nil) ... 0025:trace:setupapi:SetupPromptForDiskW (nil), L"Setup - Files Needed", L"Disk 1", L"E:\", L"main2.cab", (null), 0x00000308, 0x64ca70, 260, (nil) 0025:Call user32.DialogBoxParamW(7d810000,000003e9,00000000,7d82f916,0064c9c8) ret=7d82fe81 ... --- snip ---
Relevant trace log snippet with native override:
WINEDEBUG=+tid,+seh,+relay,+snoop,+setupapi
--- snip --- 0029:Call KERNEL32.WideCharToMultiByte(00000000,00000000,0072a5b0 L"E:\",00000004,00726c08,00000008,00000000,00000000) ret=778fa41d 0029:Ret KERNEL32.WideCharToMultiByte() retval=00000004 ret=778fa41d ... 0029:Call KERNEL32.WideCharToMultiByte(00000000,00000000,0072a0e8 L"main2.cab",0000000a,00726c20,00000014,00000000,00000000) ret=778fa41d 0029:Ret KERNEL32.WideCharToMultiByte() retval=0000000a ret=778fa41d ... 0029:Call KERNEL32.WideCharToMultiByte(00000000,00000000,0072a108 L"Disk 1",00000007,00726c40,0000000e,00000000,00000000) ret=778fa41d 0029:Ret KERNEL32.WideCharToMultiByte() retval=00000007 ret=778fa41d ... 0029:CALL SETUPAPI.SetupPromptForDiskA(<unknown, check return>) ret=10002b3b ... 0029:Call KERNEL32.GetDriveTypeW(0067caf8 L"E:\") ret=7795ad2f 0029:Ret KERNEL32.GetDriveTypeW() retval=00000005 ret=7795ad2f ... 0029:Call KERNEL32.SetErrorMode(00000001) ret=77900532 0029:Ret KERNEL32.SetErrorMode() retval=00008001 ret=77900532 0029:Call KERNEL32.FindFirstFileW(007273f0 L"E:\main2.cab",0067c3f8) ret=77900546 0029:Ret KERNEL32.FindFirstFileW() retval=0072c1f8 ret=77900546 0029:Call KERNEL32.FindClose(0072c1f8) ret=77900556 0029:Ret KERNEL32.FindClose() retval=00000001 ret=77900556 0029:Call KERNEL32.SetErrorMode(00008001) ret=77900571 0029:Ret KERNEL32.SetErrorMode() retval=00000001 ret=77900571 ... 0029:RET SETUPAPI.SetupPromptForDiskA(00000000,100046ac,00726c40,0067e628,00726c20,00000000,00000308,0067d1a0,00000104,00000000) retval=00000000 ret=10002b3b ... --- snip ---
It seems SetupPromptForDiskA/W needs to check for the existence of the file first before putting up a dialog (makes sense). If the file exists a dialog is newer shown so the SetupPromptForDisk() is effectively a no-op here.
Source: http://source.winehq.org/git/wine.git/blob/750463f21c77b7522c2a5b85fb98ecb76...
--- snip --- 234 UINT WINAPI SetupPromptForDiskW(HWND hwndParent, PCWSTR DialogTitle, PCWSTR DiskName, 235 PCWSTR PathToSource, PCWSTR FileSought, PCWSTR TagFile, DWORD DiskPromptStyle, 236 PWSTR PathBuffer, DWORD PathBufferSize, PDWORD PathRequiredSize) 237 { 238 struct promptdisk_params params; 239 UINT ret; 240 241 TRACE("%p, %s, %s, %s, %s, %s, 0x%08x, %p, %d, %p\n", hwndParent, debugstr_w(DialogTitle), 242 debugstr_w(DiskName), debugstr_w(PathToSource), debugstr_w(FileSought), 243 debugstr_w(TagFile), DiskPromptStyle, PathBuffer, PathBufferSize, 244 PathRequiredSize); 245 246 if(!FileSought) 247 { 248 SetLastError(ERROR_INVALID_PARAMETER); 249 return DPROMPT_CANCEL; 250 } 251 params.DialogTitle = DialogTitle; 252 params.DiskName = DiskName; 253 params.PathToSource = PathToSource; 254 params.FileSought = FileSought; 255 params.TagFile = TagFile; 256 params.DiskPromptStyle = DiskPromptStyle; 257 params.PathBuffer = PathBuffer; 258 params.PathBufferSize = PathBufferSize; 259 params.PathRequiredSize = PathRequiredSize; 260 261 ret = DialogBoxParamW(SETUPAPI_hInstance, MAKEINTRESOURCEW(IDPROMPTFORDISK), 262 hwndParent, promptdisk_proc, (LPARAM)¶ms); 263 264 if(ret == DPROMPT_CANCEL) 265 SetLastError(ERROR_CANCELLED); 266 return ret; 267 } --- snip ---
$ wine --version wine-1.5.4
Regards