3 Replies Latest reply on Dec 7, 2011 11:54 AM by RvdNieuwendijk

    Add vmware wddm video driver per script

    meistermn Master

      Found two ways , how to add the vmware wddm video driver per script for windows 2008 r2 sp1

       

      Solution one by pnputil
      http://integritycomm.blogspot.com/2010/10/vsphere-client-console-mouse-is-slow-to.html

       

      @echo off

      IF NOT EXIST "c:\program files\common files\vmware\drivers\wddm_video\vm3d.inf" GOTO:EOF

       

      pnputil -i -a "c:\program files\common files\vmware\drivers\wddm_video\vm3d.inf"
      shutdown /r /f /c "VMware vSphere WDDM Video Driver Update" /t 1

       

      Solution two by dpinst.exe

       

      http://communities.vmware.com/message/1808886

       

       

      Easiest way I found to fix this was to use DPInst.exe which can be found in the Windows Driver Installation Kit --

       

      http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=11800

       

      Once you've download the ISO install the \WDK\dfx*.msi. This will install DPInst.exe into some obscure directory on your C:\

       

      To fix the issue just copy DPInst.exe to the drivers\wddm_video folder on the VM and run 'DPInst.exe /s /f /se /sw'.

       

      This will silently force the install of the wddm driver.

      All thats needed after that is a reboot.

       

      Solution three by devcon

      http://www.thesystemsengineer.com/technical/windows-2008-r2-wddm-video-driver-script/

       

       

      Is there a powershell way ?

        • 1. Re: Add vmware wddm video driver per script
          meistermn Master

          In powercli

           

          Solution one by pnputil

           

          a)

          # Checks If a File vm3d.inf Exists
          $CheckFile = "c:\program files\common files\vmware\drivers\wddm_video\vm3d.inf"
          $FileExists = Test-Path $CheckFile
          If ($FileExists -eq $True) {Write-Host "WDDM Driver exist"}
          Else {Write-Host "No file at this location, VMware tools was not before installed"}

           

          $wddmvideodriver =  pnputil -i -a "c:\program files\common files\vmware\drivers\wddm_video\vm3d.inf"
          shutdown /r /f /c "VMware vSphere WDDM Video Driver Update" /t 1

          Invoke-Item $wddmvideodriver

          b)

          Invoke-Item vmwarewddmadd.cmd

           

          Solution two by 'DPInst.exe

           

          $wddmvideodriver = 'DPInst.exe /s /f /se /sw'

          Invoke-Item $wddmvideodriver

          • 2. Re: Add vmware wddm video driver per script
            RvdNieuwendijk Virtuoso
            User ModeratorsvExpert

            Thanks for posting this. It is just what I need. Yesterday we discovered that the problems we had with hanging Windows Server 2008 R2 systems were caused by the VMware SVGA II video driver we deployed. Now we have to patch our virtual Windows Server 2008 R2 systems to install the wddm video driver.

             

            I will try to modify the script in a way that it first checks if the wddm driver is already installed. So it doesn't reboot a system if it isn't necessary. I will post the modifications I make to the script in this thread.

            • 3. Re: Add vmware wddm video driver per script
              RvdNieuwendijk Virtuoso
              User ModeratorsvExpert

              I made a new version of the script that does some more checks before it tries to install the WDDM driver. As promised I will share my new version with you in this thread. I have also made a blogpost Using PowerShell to install the WDDM video driver about this script at my blog http://rvdnieuwendijk.com.

               

              # Check to make sure this script only runs on Microsoft Windows Server 2008 R2 system.
              
              $OperatingSystem = Get-WmiObject -Class Win32_OperatingSystem
              if ($OperatingSystem -and $OperatingSystem.Name -like "Microsoft Windows Server 2008 R2 *") {
              
                # Get the display device driver.
                
                $DisplayDriver = Get-WMIObject -Query "Select * from Win32_PnPSignedDriver Where DeviceClass='DISPLAY'"
                
                # Check to see if we have the WDDM display device driver.
                
                if ($DisplayDriver -and $DisplayDriver.DeviceName -ne "VMware SVGA 3D (Microsoft Corporation - WDDM)") {
                
                  # We have the wrong driver. We need to install the correct one.
                  # Check if the VMware Tools are installed and the WDDM driver can be found.
                  
                  $WddmFile = "c:\program files\common files\vmware\drivers\wddm_video\vm3d.inf"
                  if (Test-Path -Path $WddmFile) {
                  
                    # Install the WDDM driver and restart the computer.
                    
                    pnputil -i -a "$WddmFile"
                    Restart-Computer
                  }
                  else {
                    Write-Warning "WDDM driver file $WddmFile not found on this computer."
                  }
                }
                else {
                  Write-Output "The WDDM display driver is already installed on this computer."
                }
              }
              else {
                Write-Output "This script is only intended for the Microsoft Windows Server 2008 R2 operating system."
              }
              
              

               

              Message was edited by: RvdNieuwendijk Added the link to my blogpost.