VirtualBox

Opened 12 years ago

Last modified 10 years ago

#10592 new defect

Documentation for "Restoring d3d8.dll and d3d9.dll" is incomplete

Reported by: Ryan Steele Owned by:
Component: documentation Version: VirtualBox 4.1.16
Keywords: Cc:
Guest type: Windows Host type: all

Description

A recent version of the Guest Additions installer on Windows implemented a check for "corrupted" versions of d3d8.dll and d3d9.dll. When the installer discovers an incorrect version of one of these files, it opens the following URL in the user's web browser:

http://www.virtualbox.org/manual/ch12.html#ts_d3d8-d3d9-restore

The instructions for Windows 7 are to replace the following files from the original Windows media:

C:\Windows\System32\d3d9.dll
C:\Windows\SYSWOW64\d3d8.dll
C:\Windows\SYSWOW64\d3d9.dll

The instructions are incomplete, however, as the guest additions installer also checks for incorrect versions of the following files, and fails if they are found:

C:\Windows\system32\dllcache\d3d9.dll
C:\Windows\SysWOW64\dllcache\d3d8.dll
C:\Windows\system32\msd3d9.dll

I believe the first two files can simply be deleted as they are merely cached copies. The third, msd3d9.dll, was not present on the Windows media I was using, and I suspect it can be deleted as well.

The documentation should be updated to include instructions about deleting these files manually. Alternately, the installer could delete these files itself.

Change History (2)

comment:1 by xenoson, 11 years ago

The documentation is completely wrong about putting files into "Windows\System32 (or C:\Windows\SysWOW64 for 64 bit version)". The correct way to fix the d3d8.dll/d3d9.dll mess by virtualbox guest additions setup is to put the right files back into "Windows\winsxs" and afterwards run

sfc.exe /SCANNOW

to repair the hardlinks.

Getting the right files

In case of windows 7 we need

  • the setup cd with sources\install.wim and
  • the extracted full service pack 1 for the files

Setup CD

With 7zip file manager we navigate into

install.wim\N\Windows\winsxs\

where N is a number for the different versions as said in the manual, to extract the files shown in the following table.

DirectoryFile
x86_microsoft-windows-directx-direct3d8_31bf3856ad364e35_6.1.7600.16385_none_c222c27ec21ab213d3d8.dll
x86_microsoft-windows-directx-direct3d9_31bf3856ad364e35_6.1.7600.16385_none_c223c2c8c219cb6ad3d9.dll

and aditionally for 64 bit

amd64_microsoft-windows-directx-direct3d9_31bf3856ad364e35_6.1.7600.16385_none_1e425e4c7a773ca0d3d9.dll

Service Pack Files

With 7zip file manager we navigate into the extracted service pack content

windows6.1-KB976932-X86.cab

or for 64 bit

windows6.1-KB976932-X64.cab

and find

x86_microsoft-windows-directx-direct3d9_31bf3856ad364e35_6.1.7601.17514_none_c454d690bf084f04d3d9.dll

and aditionally for 64 bit

amd64_microsoft-windows-directx-direct3d9_31bf3856ad364e35_6.1.7601.17514_none_207372147765c03ad3d9.dll

Changing the Permissions

The owner of the the files and folders within winsxs is the TrustedInstaller

With an administrative file manager we first take ownership of the five directories:

x86_microsoft-windows-directx-direct3d8_31bf3856ad364e35_6.1.7600.16385_none_c222c27ec21ab213
x86_microsoft-windows-directx-direct3d9_31bf3856ad364e35_6.1.7600.16385_none_c223c2c8c219cb6a
x86_microsoft-windows-directx-direct3d9_31bf3856ad364e35_6.1.7601.17514_none_c454d690bf084f04
amd64_microsoft-windows-directx-direct3d9_31bf3856ad364e35_6.1.7600.16385_none_1e425e4c7a773ca0
amd64_microsoft-windows-directx-direct3d9_31bf3856ad364e35_6.1.7601.17514_none_207372147765c03a

then add our user to the access control list and give us full control. Only now we are allowed to replace the files with the ones extracted above.

Afterwards we remove our user from the acl, the correct mode is inheritance from parent directory, and we change the owner back to

NT SERVICE\TrustedInstaller

finally

sfc.exe /SCANNOW

can do its job.

Deleting additional copies

To stop the guest additions installer complaining "Your Direct X driver is corrupt or incorrect" we also need to delete the oracle files from dllcache. On 64 Bit there are two dllcache directories:

Windows\system32\dllcache 
Windows\SysWOW64\dllcache

If you use a 32 bit file manager on a 64 bit system these are the same, as system32 points to SysWOW64 because of file system redirection. So there is a third

Windows\SysNative\dllcache

for the 64 bit files.

Last edited 11 years ago by xenoson (previous) (diff)

comment:2 by Fred Houweling, 10 years ago

I just wanted to add, that these instructions (especially those by xenoson above) are valid and indeed fixed the errors the installer used to give (Win 7 Ult Guest, Fedora 20 Host) It would be ideal if the install just fixed it itself.

Version 3, edited 10 years ago by Fred Houweling (previous) (next) (diff)
Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use