https://bugs.winehq.org/show_bug.cgi?id=50318
Bug ID: 50318 Summary: 'HKLM\System\CurrentControlSet\Services\Tcpip\Paramete rs\DataBasePath' registry entry has non-standard value Product: Wine Version: 6.0-rc2 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: loader Assignee: wine-bugs@winehq.org Reporter: focht@gmx.net Distribution: ---
Hello folks,
related to bug 12076 but a preceding registry issue.
Stable download link to 3ds Max 9 trial version via Internet Archive:
https://web.archive.org/web/20150724061434/http://files.modacity.net/softwar...
--- snip --- $ WINEDEBUG=+seh,+relay,+loaddll,+msi wine msiexec -i 3dsmax9_win32.msi
log.txt 2>&1
... 0118:trace:msi:ACTION_CustomAction Handling custom action L"MRSetService" (1 L"Callcustom" L"MRSetService") ... 0118:trace:msi:HANDLE_CustomType1 Calling function L"MRSetService" from L"C:\users\focht\Temp\msi9e65.tmp" ... 07d0:Ret KERNEL32.LoadLibraryA() retval=00000000 ret=017e033f 07d0:Ret PE DLL (proc=017EEF6D,module=017B0000 L"msi9e65.tmp",reason=PROCESS_ATTACH,res=00000000) retval=1 ... 07d0:Ret KERNEL32.LoadLibraryW() retval=017b0000 ret=100210f6 07d0:Call KERNEL32.GetProcAddress(017b0000,0017eae0 "MRSetService") ret=1002110a 07d0:Ret KERNEL32.GetProcAddress() retval=017c1c80 ret=1002110a ... 07d0:Call advapi32.RegOpenKeyExA(80000002,01808614 "SYSTEM\CurrentControlSet\Services\Tcpip\Parameters",00000000,0002001f,014df034) ret=017c1b81 07d0:Ret advapi32.RegOpenKeyExA() retval=00000000 ret=017c1b81 07d0:Call advapi32.RegQueryValueExA(000000d4,01808604 "DataBasePath",00000000,014df01c,014df03c,014df020) ret=017c0561 07d0:Ret advapi32.RegQueryValueExA() retval=00000000 ret=017c0561 07d0:Call KERNEL32.ExpandEnvironmentStringsA(014df03c "C:\windows\system32\drivers",014df43c,00000400) ret=017c1bfd 07d0:Ret KERNEL32.ExpandEnvironmentStringsA() retval=0000001c ret=017c1bfd ... 07d0:Call KERNEL32.GetFullPathNameA(019a0ea8 "C:\windows\system32\drivers\services",00000104,014df688,014df4f8) ret=017de351 ... 07d0:Ret KERNEL32.GetFullPathNameA() retval=00000024 ret=017de351 ... 07d0:Call KERNEL32.FindFirstFileA(019a0ea8 "C:\windows\system32\drivers\services",014df50c) ret=017de3f1 ... 07d0:Ret KERNEL32.FindFirstFileA() retval=ffffffff ret=017de3f1 .... 07d0:Call KERNEL32.CreateFileA(019a0ea8 "C:\windows\system32\drivers\services",80000000,00000000,014df670,00000003,00000080,00000000) ret=017de5f4 ... 07d0:Ret KERNEL32.CreateFileA() retval=ffffffff ret=017de5f4 07d0:Call KERNEL32.GetLastError() ret=017de2cf 07d0:Ret KERNEL32.GetLastError() retval=00000002 ret=017de2cf ... 07d0:Call KERNEL32.RaiseException(e06d7363,00000001,00000003,014df770) ret=017eec32 07d0:Call ntdll.memcpy(014df6c8,014df770,0000000c) ret=7b00ff18 07d0:Ret ntdll.memcpy() retval=014df6c8 ret=7b00ff18 07d0:trace:seh:dispatch_exception code=e06d7363 flags=1 addr=7B00FF28 ip=7b00ff28 tid=07d0 07d0:trace:seh:dispatch_exception info[0]=19930520 07d0:trace:seh:dispatch_exception info[1]=014df7a0 07d0:trace:seh:dispatch_exception info[2]=01811c9c 07d0:trace:seh:dispatch_exception eax=014df6b4 ebx=0017ea01 ecx=014df770 edx=0000000c esi=00000003 edi=014df720 07d0:trace:seh:dispatch_exception ebp=014df708 esp=014df6b4 cs=7bc50023 ds=14d002b es=7bc3002b fs=14d0063 gs=006b flags=00000216 07d0:trace:seh:call_vectored_handlers calling handler at 7B00F270 code=e06d7363 flags=1 07d0:trace:seh:call_vectored_handlers handler at 7B00F270 returned 0 07d0:trace:seh:call_stack_handlers calling handler at 01805E2E code=e06d7363 flags=1 ... 07d0:Call user32.MessageBoxA(00000000,0181d368 "Runtime Error!\n\nProgram: C:\windows\system32\msiexec.exe\n\n\r\nThis application has requested the Runtime to terminate it in an unusual way.\nPlease contact the application's support team for more information.\r\n",0180b7b8 "Microsoft Visual C++ Runtime Library",00012010) ret=017fdfa1 ... --- snip ---
The custom action dll appends 'services' to the path queried from registry and tries to access the file.
'C:\windows\system32\drivers\services'
This obviously can't work because file doesn't exist -> bug 12076
But the installer is supposed to access 'C:\windows\system32\drivers\etc\services' here. Wine uses a non-standard path here.
Wine registry:
--- snip --- [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters] "DataBasePath"="C:\windows\system32\drivers" --- snip ---
Wine source:
https://source.winehq.org/git/wine.git/blob/3acb0b3326c4120ea0c4c6076bd03c9c...
--- snip --- 3947 HKLM,"System\CurrentControlSet\Services\Tcpip\Parameters","DataBasePath",2,"%11%\drivers" --- snip ---
According to Microsoft docs:
https://support.microsoft.com/en-us/help/314053/tcp-ip-and-nbt-configuration...
--- quote --- DatabasePath Key: Tcpip\Parameters Value Type: REG_EXPAND_SZ - Character string Valid Range: A valid Windows NT file path Default: %SystemRoot%\System32\Drivers\Etc Description: This parameter specifies the path of the standard Internet database files (HOSTS, LMHOSTS, NETWORKS, PROTOCOLS). It is used by the Windows Sockets interface. --- quote ---
The custom action dll also calls 'ExpandEnvironmentStringsA' afterwards which suggests this key is indeed of 'REG_EXPAND_SZ' type.
Autodesk KB:
https://knowledge.autodesk.com/search-result/caas/sfdcarticles/sfdcarticles/...
--- quote --- Issue: 3DS Max installs will fail. The log shows CustomAction MRSetService returned actual error code 1603 Causes: Mental Ray Satallite service cannot be created Solution:
One known cause of this error is a missing "Services" file from C:\Windows\System32\drivers\etc. If that file is missing it can be recovered with a windows OS repair or by simply copying it over from a system that still has the file.
Workaround:
If the user will not be using Mental Ray for rendering you can remove the Mental Ray service from the installation. Steps below
1.) Download and install orca msi editing tool http://www.technipages.com/download-orca-msi-editor 2.) Copy the install media for 3ds max to a local drive or navigate to the downloaded installer directory. Find the install msi for 3ds Max, usually x64/max/3dsmax.msi 3.) Right click the msi and choose edit in orca 4.) In "Custom Actions" Search for the line MRSetService and delete it. Close Orca and save the changes. 5.) Run the 3ds Max install again. --- quote ---
It seems the key was added with bug 45821 ("Metasploit Console won't start due to missing registry value HKLM\System\CurrentControlSet\Services\Tcpip\Parameters\DataBasePath") but with non-standard value.
https://source.winehq.org/git/wine.git/commitdiff/bfe48889aeda69cac81e46b1d5...
No idea where Alex got the key value from.
After the fix, the installer will still abort but now trying the proper non-existing file path.
This will match what the Wine-Staging patchset from bug 12076 does: creating the missing files in 'C:\windows\system32\drivers\etc\' directory.
https://github.com/wine-staging/wine-staging/blob/master/patches/wineboot-dr...
$ sha1sum 3dsmax9.zip d04eeb0eeabbb7cedaf536170fb6879b2faf1a25 3dsmax9.zip
$ du -sh 3dsmax9.zip 590M 3dsmax9.zip
$ wine --version wine-6.0-rc2
Regards
https://bugs.winehq.org/show_bug.cgi?id=50318
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |https://web.archive.org/web | |/20150724061434/http://file | |s.modacity.net/software/3ds | |max/3dsmax9.zip Keywords| |download, Installer
https://bugs.winehq.org/show_bug.cgi?id=50318
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED Fixed by SHA1| |a7a1e2643afd93de4fc123a9113 | |834da59aed43d
--- Comment #1 from Anastasius Focht focht@gmx.net --- Hello folks,
this is fixed by commit https://source.winehq.org/git/wine.git/commitdiff/a7a1e2643afd93de4fc123a911... ("wine.inf: Fix the Tcpip database path.")
Thanks Alexandre
--- snip --- $ wine reg query "HKLM\System\CurrentControlSet\Services\Tcpip\Parameters"
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters DataBasePath REG_SZ C:\windows\system32\drivers\etc Domain REG_SZ fritz.box Hostname REG_SZ linux --- snip ---
$ wine --version wine-6.6-149-g39263558a20
Regards
https://bugs.winehq.org/show_bug.cgi?id=50318
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #2 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 6.7.
https://bugs.winehq.org/show_bug.cgi?id=50318
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |6.0.x
https://bugs.winehq.org/show_bug.cgi?id=50318
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|6.0.x |---
--- Comment #3 from Michael Stefaniuc mstefani@winehq.org --- Removing the 6.0.x milestone from bug fixes included in 6.0.2.