Category Archives: Windows

Windows 7 new user profile – MSOE.DLL could not be loaded error

Since my Windows 7 deployment I get an error every time a new user logs in (or logs in following a profile reset).

Windows Mail could not be started because MSOE.DLL could not be loaded

Since you can click past it I wasn’t initially too concerned but I soon came to realize that there’s pretty much no information on the Web about this problem. Anything the search engines turn up is invariably about Outlook Express on Windows 98/Me.

It seems to be caused when some kind of IE First Run process opens Internet Explorer with an MSN page and presumably tries to register the default email client (which is not yet set to Outlook, despite it being installed). The strange thing is that Windows Mail is not even available on Windows 7. Microsoft discontinued it after Vista in favour of Windows Live Mail. WinMail.exe is present on the system but it’s hidden, and that MSOE.DLL has been purposely omitted. Apparently you can get it working again by supplying a copy from a Vista PC.

The problem is that this error looks important enough for a new user to contact the helpdesk about. The other issue is that it significantly delays that first logon, sometimes by several entire minutes. The error occurs immediately after you enter your credentials (you can hear the alert sound) but it happens while the desktop is still hidden from view by the Windows 7 splash screen. Eventually the Preparing your desktop splash screen times out and you can click OK:

Windows Mail could not be started because MSOE.DLL could not be loaded

Notice the label in that floating window – it’s setting up a component which is titled as Microsoft Windows.

Eventually I discovered a KB article relating to Internet Explorer 5 personalized settings, which was when Microsoft introduced this method of installation.

Having consulted that document I viewed HKLM\SOFTWARE\Microsoft\ActiveSetup\InstalledComponents in Regedit and saw that there is indeed a component with the name “Microsoft Windows” which is invoking WinMail.exe, intending to register it as a mail and news (nntp) client:

WinMail.exe ActiveSetup parameters

I have no idea why it’s doing this since WinMail.exe is intentionally disabled in Windows 7. It would seem logical that deleting this whole key should fix the problem (I backed it up first of course). In testing this didn’t seem to work though.

However I did notice that sometimes I got the error on screen twice and other times only once. Exasperated I searched the registry for instances of WinMail.exe until I discovered the reason: the entire ActiveSetup branch of the registry also exists under HKLM\Software\WOW6432Node\Microsoft, for the 32bit version of Internet Explorer on 64bit systems. Once both keys had been deleted the error disappeared.

I was then able to refine this – instead of deleting the whole key you only need to set to the single DWORD value IsInstalled to zero. Do this to both instances and the problem is fixed! In my environment I used my existing VBScript startup script which worktations inherit by Group Policy. Excerpt below:

If InStr (strOS,"Microsoft Windows 7") Then
  'Prevent Windows from trying to invoke the non-existent Windows Mail for new user profile setup
  On Error Resume Next
  strKey = "SOFTWARE\Microsoft\Active Setup\Installed Components\{44BBA840-CC51-11CF-AAFA-00AA00B6015C}"
  objReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKey,"IsInstalled",0
  strKey = "SOFTWARE\Wow6432Node\Microsoft\Active Setup\Installed Components\{44BBA840-CC51-11CF-AAFA-00AA00B6015C}"
  objReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKey,"IsInstalled",0
  On Error Goto 0

Compiling FFmpeg for Windows with libfaac and libmp3lame

Having realised how simple it is to compile stuff on my Synology NAS I decided to finally get something built on Windows using free tools. It’s not really much different, but I had to do a lot of searching to finally gather all the necessary configure parameters.

First we need to set up the build environment. MinGW stands for ‘Minimalist GNU for Windows’. Download the MinGW-get installer, which will install everything you’ll need including MSYS which is a Unix shell complete with all the essential binaries. Run the MinGW-get installer and select Download latest repository catalogs.
In the options add the C++ compiler (needed for FAAC) and select MSYS Basic System and MinGW Developer Toolkit.

Now download the source .tar.gz files of:

Launch MinGW Shell from the Start Menu.
Copy those downloaded files to C:\MinGW\msys\1.0\home\yourusername
For each one run:

tar xvfz packagename.tar.gz
 

Then in order, cd into each extracted directory and…

For NASM and yasm:

./configure
make
make install
 

For FAAC (we need to disable the mp4v2 option to avoid a nasty compiler error – took me a long time to discover):

./bootstrap CC='gcc -mno-cygwin'
./configure --prefix=/mingw --exec-prefix=/mingw --enable-static --disable-shared --with-mp4v2=no
make
make install
 

For LAME:

./configure --prefix=/mingw --exec-prefix=/mingw --enable-static --disable-shared --disable-decoder --enable-nasm
make
make install
 

For FFmpeg:

./configure --enable-static --disable-shared --disable-ffplay --disable-ffserver --enable-memalign-hack --enable-libmp3lame --enable-nonfree --enable-libfaac --arch=x86 --enable-runtime-cpudetect --enable-w32threads
make
make install
 

The compiled ffmpeg.exe will be in C:\MinGW\msys\1.0\local\bin

Update – I tried to set this up on my work PC which runs 64 bit Windows 7 and I discovered that it’s a world of pain, so I’ll have to amend this post once I solve it.

Enabling Network Level Authentication on Windows XP by script

Migrating to Windows 7 has thrown up another problem – users wanting to connect from home computers running XP cannot use the Remote Desktop Client to connect to their newly upgraded office PCs. The Network Level Authentication change to the Remote Desktop Client was made because the original RDP is susceptible to Man-in-the-middle attacks.

Rather than leaving the new systems vulnerable by allowing connections from all clients in Computer Propertes > Remote settings, I discovered that Windows XP SP3 does in fact offer NLA support however it’s disabled by default. Somewhat frustratingly, the steps outlined in Microsoft KB 951608 require Registry edits which I would not want to encourage non-IT-savvy people to try. Giving out a .reg file is not really a good idea here either since these are additions to existing values, so forced replacements could interfere with certain vendors’ VPN clients etc.

Here’s a VBScript for the task which will only install on XP SP3 and will detect if the modifications have already been made. You could easily target it at a whole group of PCs by iterating through an array of hostnames.

'Enables Network Level Authentication on XP SP3 (disabled by default)
'which allows you to use the Remote Desktop Client 6.1 to connect to
'Windows 7 and Windows Server 2008 R2 without degrading security

Option Explicit

Const HKEY_LOCAL_MACHINE = &H80000002

Dim strLsaKey, strLsaValue, strHostname, size, arrMultiRegSZ, objReg, objWMI, colItems, i, found, modified
Dim objItem, SPlevel, strOSVer, strSecProvKey, strSecProvValue, strValue

strLsaKey = "SYSTEM\CurrentControlSet\Control\Lsa"
strLsaValue = "Security Packages"
strSecProvKey = "SYSTEM\CurrentControlSet\Control\SecurityProviders"
strSecProvValue = "SecurityProviders"
strHostname = "."
modified = false
found = false

Set objWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strHostname & "\root\cimv2")
Set colItems = objWMI.ExecQuery("SELECT * FROM Win32_OperatingSystem")
For Each objItem In colItems
  strOSVer = objItem.Version
  SPlevel = objItem.ServicePackMajorVersion
Next
If Not Left(strOSVer,3) = "5.1" Then
  WScript.Echo "This script is only intended for Windows XP."
  WScript.Quit
End If
If Not SPlevel >= 3 Then
  WScript.Echo "Please install the latest Windows XP Service Pack from Windows Update."
  WScript.Quit
End If

Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strHostname & "\root\default:StdRegProv")
objReg.GetMultiStringValue HKEY_LOCAL_MACHINE, strLsaKey, strLsaValue, arrMultiRegSZ
size = Ubound(arrMultiRegSZ)
For i=0 to size
  If arrMultiRegSZ(i) = "tspkg" Then
    found = true
  End If
Next
If found Then
  WScript.Echo "tspkg already added to HKLM\SYSTEM\CurrentControlSet\Control\Lsa"
Else
  ReDim Preserve arrMultiRegSZ(size + 1)
  arrMultiRegSZ(size + 1) = "tspkg"
  objReg.SetMultiStringValue HKEY_LOCAL_MACHINE, strLsaKey, strLsaValue, arrMultiRegSZ
  modified = true
End If

objReg.GetStringValue HKEY_LOCAL_MACHINE, strSecProvKey, strSecProvValue, strValue

If Instr(strValue,"credssp.dll") Then
  WScript.Echo "credssp.dll already added to HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders"
Else
  strValue = strValue & ", credssp.dll"
  objReg.SetStringValue HKEY_LOCAL_MACHINE, strSecProvKey, strSecProvValue, strValue
  modified = true
End If
If modified Then
  WScript.Echo "Settings updated. You will need to restart for the changes to become active."
End If

Set objReg = nothing
Set objWMI = nothing

Dell OptiPlex GX280 Windows 7 drivers

Dell do not make any Windows 7 drivers available for the OptiPlex GX280 even though this machine can run it acceptably (32bit only). Where I work there are a few of these machines which will be kept as spares if any of the main stock of OptiPlex GX620 machines fail and need repairing, and for miscellaneous duties like driving plasma screens in reception etc.

These machines use the Intel 915G integrated video card which frustrated people by being advertised as Vista-ready (supporting Aero Glass transparency in the Vista Beta) but then having Aero support withdrawn completely. Since there is no WDDM driver for this chip, we need to use the XDDM (XP Display Driver Model) driver. For some laptops Windows Update will detect and install this driver, but not in this case. Intel also seem to hide it away on their download site. It can be found by navigating:

Graphics > Laptop Graphics Controllers > Mobile Intel® 915GM/GMS, 910GML Express Chipset Family > Windows XP Professional

…or directly from here.

The SoundMAX Integrated Audio is detected and installed by Windows Update, but if you’re maintaining a WIM image or building an unattended install you’ll need to isolate the driver files. These are also available at Microsoft Update Catalog – search for SoundMAX Integrated Digital Audio, order by date and look for the Windows 7 driver published on 10/31/2006 version 5.12.01.7010.

Migrating roaming profiles to Windows 7

Though a Microsoft user migration tool exists, I only want the bare minimum to be carried across from XP and I definitely want automation to ensure consistency. I made this script to be run by support technicians while logged in on newly installed Windows 7 as the user being migrated. The My Documents folder redirection is particularly important – the script mounts the old XP profile’s registry hive from the server, and checks whether My Documents was correctly redirected to the home drive. If not, the script will migrate the files from the old location. This tidies up any old inconsistent user profiles. Having My Documents on the home drive keeps profile size down for faster logins when roaming and helps to reduce the chance of a user losing data if their hard disk fails.

I spent a while wondering how to keep this as a single script despite the need to use RunAs for the Registry hive mount before hitting on the idea of recursion – see highlight below (%0 is the running script’s full name with path, %~nx0 is just the filename and extension). Despite the /env in the command which is supposed to make the invoked process share the main user environment, only some things are in fact shared. %TEMP% is for instance, though environment variables are not. So I pass the username as a command line, and recover the results of the Registry parse from a temporary file.

UPDATE – Since the file copying can take a long while I have made the My Documents path checking the first task, a failure of which will quit the script. There is now a five second delay between mounting the Registry hive and querying it) which should stop the script having to be run twice.

@echo off
set FServer=YourServerHere
echo .:: User profile migration script for user %USERNAME%
echo.

if not "%1" == "" goto checkxpreg

echo .:: We need admin rights to mount and check the user's XP profile registry hive
runas /env /noprofile /user:%USERDOMAIN%\Administrator "%~nx0 %USERNAME%"

if exist %TEMP%\XPMyDocsPath.txt type %TEMP%\XPMyDocsPath.txt
if not exist %TEMP%\XPMyDocsPath.txt (
  echo .:: ERROR the XP profile registry hive has not mounted - run the script again!
  goto :eof
)

if exist %TEMP%\DocsNeedMoving.txt (
  echo.
  echo .:: Migrating content to H:\ ready for Windows 7
  xcopy /y /e /c "\\%FSERVER%\profiles$\%USERNAME%\My Documents\*.*" "H:\"
)
if not exist %TEMP%\DocsNeedMoving.txt (
  echo.
  echo .:: No documents need moving
)
echo.

echo .:: My Documents redirection to root of H: drive
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Personal /t REG_SZ /d "H:" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Personal /t REG_EXPAND_SZ /d %%HOMEDRIVE%% /f
echo.

echo .:: IE Favorites
xcopy /y /e /c \\%FSERVER%\profiles$\%USERNAME%\Favorites\*.* %USERPROFILE%\Favorites\
echo.

echo .:: Outlook signatures
xcopy /y /e /c "\\%FSERVER%\profiles$\%USERNAME%\Application Data\Microsoft\Signatures\*.*" %USERPROFILE%\AppData\Roaming\Microsoft\Signatures\

echo .:: Outlook nicknames file
if not exist %USERPROFILE%\AppData\Roaming\Microsoft\Outlook\*.* md %USERPROFILE%\AppData\Roaming\Microsoft\Outlook
copy /y "\\%FSERVER%\profiles$\%USERNAME%\Application Data\Microsoft\Outlook\*.nk2" %USERPROFILE%\AppData\Roaming\Microsoft\Outlook\
echo.

echo .:: Word user templates
xcopy /y /e /c "\\%FSERVER%\profiles$\%USERNAME%\Application Data\Microsoft\Templates\*.*" %USERPROFILE%\AppData\Roaming\Microsoft\Templates\
echo.

echo .:: Desktop files and shortcuts
xcopy /y /e /c \\%FSERVER%\profiles$\%USERNAME%\Desktop\*.* %USERPROFILE%\Desktop\
echo.

:: Stop the shell from changing the display name of the folder to My Documents on the fileserver
if exist H:\Desktop.ini (
  attrib -r -s -h H:\Desktop.ini
  del H:\Desktop.ini
)
:: Cleanup
if exist %TEMP%\DocsNeedMoving.txt del %TEMP%\DocsNeedMoving.txt
del %TEMP%\XPMyDocsPath.txt

pause
goto :eof

:checkxpreg
if exist del %%TEMP%\DocsNeedMoving.txt
reg load "HKEY_USERS\TempXPRegHive" "\\%FSERVER%\profiles$\%1\NTUSER.DAT"
echo .:: Waiting 5 seconds - Registry hive mount seems unreliable if queried immediately
ping 1.1.1.1 -n 1 -w 5000 > nul
for /f "tokens=2* delims= " %%a in ('reg query "HKEY_USERS\TempXPRegHive\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Personal') do set TempMyDocs=%%b
echo XP profile My Documents=%TEMPMYDOCS%> %TEMP%\XPMyDocsPath.txt
echo %TEMPMYDOCS% | find /I "%1" && date /t> %TEMP%\DocsNeedMoving.txt
reg unload "HKEY_USERS\TempXPRegHive"
set TempMyDocs=

vSphere CLI libeay32.dll error on 64bit Windows 7

If you install the latest build of vSphere CLI 4.1 on Windows 7 x64 some of the commands will fail, with perl.exe throwing the following error:

The ordinal 3212 could not be located in the dynamic link library LIBEAY32.dll

There isn’t much to go on when you look up the error – just a lot of people saying you should delete all older copies of LIBEAY32.dll from your system.

Fortunately there is a neater solution, and I’m surprised VMware haven’t fixed this problem yet (4.0 also had the same issue).

  • Open your CLI command prompt as Administrator. Type ppm and hit enter (Perl Package Manager).
  • Now look for a module called Crypt-SSLeay. You’ll see that CLI’s bundled ActivePerl distribution includes version 0.53, but there is a newer version 0.57 available:ActiveState Perl PPM
  • Remove this as shown, then go to File -> Run Marked Actions
  • Click on the grey box icon on the left of the toolbar. These are available packages which are not currently installed. Search for Crypt-SSLeay once again, install, and Run Marked Actions. Exit.

Problem solved!

Upgrading to vCenter 4.1 with bundled SQL Express Edition – database migration fails

My infrastructure uses a bundled SQL Express Edition database because it isn’t hugely complex, and I didn’t want too much dependency on other servers (themselves VMs). I encountered problems upgrading the vCenter database while moving from Windows Server 2003 R2 SP2 x86 to Windows 2008 R2. I was migrating from vSphere 4.0U1 to 4.1. Perhaps this precise combination of versions was the problem, or perhaps it was that my database started life as VirtualCenter 3.5.

The process seems simple enough – unzip and run the Data Migration Tool from the installation media on the source vCenter server, move this folder (now with \data added) to the destination server and launch the install.bat script. However, there seem to be two major snags. The first is that the backup process will fail:

DB logs: HResult 0x2, Level 16, State 1 Named Pipes Provider: Could not open a connection to SQL Server

VMware has a knowledgbase article about this. They claim it’s caused by a misconfiguration of the SQL 2005 Express Edition instance which is pretty rich considering it was set up by their own installer. Make the named pipe change they suggest and it will work. Now unplug this machine from the LAN or disconnect its network adapter in vSphere if it’s a VM – remember you can connect the VI Client directly to the hypervisor which is hosting it.

The destination server needs to be configured with the same hostname as the source. I had then assumed that the restore tool would need to be run after a new install of vCenter 4.1 was placed on the destination server, so I installed vCenter. Then I discovered that the install.bat script in the datamigration folder refuses to run if it detects the product is already present. So naturally I uninstalled it and tried again. Perhaps this is what messed things up, or perhaps it’s because I’m using Windows 2008 R2.

Anyway, the datamigration\install.bat script kicks off the main product installer, supposedly importing all your backed up settings.

According to the vCenter 4.1 Upgrade Guide page 40 item 10 you are supposed to:

Select Install SQL Server 2005 Express instance (for small-scale deployments) and click Next.

Item 16 on the same page states that:

When the vCenter Server installation finishes, click Finish. The data migration tool restores the backed up configuration data.

If you do this you may, like me, discover that it actually doesn’t work and you end up with a completely blank database instance. Consulting datamigration\logs\restore.log I found no reference at all to any database restore.

My workaround

Go to your original vCenter server. Open the Data Sources MMC snap-in. In System DSN you should see an entry like so:

Note down the details, then create the same entry on your destination server (this will create a 64bit DSN). Notice how on page 38 of the Upgrade Guide it specifically states that:

If you use the data migration tool to migrate a SQL Server Express database located on the vCenter Server system to a new system, you do not need to create the 64-bit DSN. The data migration tool creates the DSN as part of the installation process

Apparently sometimes you do need to create the DSN.

On the destination server, copy the file \datamigration\data\vc\vc_upgraded_db and paste it in C:\temp. Rename it to vc_upgraded_db.bak.

Still on the destination server download, install and run the 64bit SQL Management Studio Express. Even if you’ve uninstalled vCenter, the SQL Express Edition instance will be left behind. If there’s not already one from a failed install, create a local database called VIM_VCDB. Restore the backup in C:\temp\vc_upgraded_db.bak over the top, paying attention to select Options -> Overwrite Existing Database and browsing to the target file locations of both the mdf and ldf files – the old database was found in C:\Program Files\Microsoft SQL Server\MSSQL.1\Data but on the 64bit system it’s C:\Program Files (x86)\…

Right-click your database, and select Properties. In Options, make sure your database recovery model is set to Simple. If you don’t do this your transaction log will fill up in a couple of days and the vCenter services will stop. In my case it seemed to have defaulted to Bulk-Logged.

Once that’s done you’ll need to update your newly created DSN to set the default database to VIM_VCDB. Now run datamigration\install.bat once again but this time opt to use an existing database as shown below:

Strangely, you will find that the you cannot use the SYSTEM account for the vCenter services however this can easily be changed in the Services MMC snap-in later.

And that’s it. You should end up with a working install with your data intact. One final tweak is to delay launch of the vCenter services so they don’t fail to start up at boot time.

UPDATE – after wasting a number of hours today with this, I’ve done some more searching and found this VMware KB article which basically just admits that the Data Migration Tool sometimes doesn’t work, and won’t even report errors in the log! When I download something as important as this, I sort of take it for granted that I won’t have to Google “vcenter data management tool does not migrate database” the moment I try using it (can’t believe I didn’t try that).

Dell OptiPlex GX620 Windows 7 drivers

Dell do not make any Windows 7 drivers available for the OptiPlex GX620 even though this machine is still a perfectly capable workstation. Where I work they make up most of our inventory and they are all being upgraded to 3GB of RAM ready for the roll-out. The Pentium D CPU runs in x64 mode, and even the Pentium 4 HT 3.40GHz sold in early configs is 64bit capable.

Windows 7 includes a driver for the Intel 945G integrated video card, though Windows Update will suggest a newer one. There is an issue with this (see my post for details), so you should use version 8.15.10.1912 instead which you can find at Microsoft Update Catalog using a search string of Intel 82945G Express and sorting by version number. You’ll need to use Internet Explorer because it requires an ActiveX control to be installed.  Download both of the two matches – one is x86, the other x64 but you can’t tell them apart until they are downloaded.

The SoundMAX Integrated Audio is detected and installed by Windows Update, but if you’re maintaining a WIM image or building an unattended install you’ll need to isolate the driver files. These are also available at Microsoft Update Catalog – search for SoundMAX Integrated Digital Audio, order by version and look for version 5.12.2.7010 for x64 and 5.12.1.7010 for x86.

Windows 7, IE8 and Adobe Flash flickering

I’m rolling out 64bit Windows 7 where I work and, though initial test PCs seemed fine in this regard, I discovered that Dell OptiPlex GX620 machines built using my unattended install have a flickering problem on web pages with Javascript content and Flash in IE8. Uninstall Adobe Flash and the problem disappears. Installing the latest build of Flash 10.1 doesn’t help, even disabling hardware acceleration in the Flash player settings.

Researching the problem online turns up little, though I did spot a few clues which led me to a solution:

  • This thread on the Microsoft forums feature quite a lot of people with the same issue name-checking Intel 945G chipset, but also ATI. Having had an ATI card of my own, I found that their driver releases can be pretty rough around the edges to say the least
  • This thread mentions that the problem tends to manifest itself with Windows 7 x64 (though I don’t have any of the affected models running x86 builds to test)
  • This thread on Overclockers.co.uk also mentions the Intel GMA 950
  • My own work PC (an iMac with an ATI card running Windows 7 x64), does not exhibit this problem, nor do Optiplex 745 (Intel Q965), nor Optiplex 780 (Intel Series 4) models
  • One Optiplex 620 which I built by hand to use as an early performance test machine does not exhibit the problem. If I remember correctly, I only installed drivers which were missing once Windows was installed…

So, as much as people seem to be blaming Adobe, it does look like a display driver issue. However I was using the most up to date Intel 945G driver version (8.15.10.1930).

Because I had injected this driver during the unattended install OfflineServicing phase, removing it in Device Manager and selecting Delete the driver software for this device did not work. The device was re-detected as Standard VGA Graphics Adaptor for a few seconds, then the same Intel driver was installed once again. So I had to:

  • Device Manager > select the Graphics card > Update Driver > Browse my computer for driver software > Let me pick from a list of device drivers on my computer > Intel(R) 82945G Express Chipset Family (Microsoft Corporation – WDDM 1.0)

Then after a reboot the problem disappeared. The original driver included with Windows 7  (8.15.10.1749) is clearly better than the newer one from the Intel website. It turned out that my working early test build machine was running 8.15.10.1912, though I cannot find that on Intel’s site.

UPDATE – The 8.15.10.1912 driver can be obtained from Microsoft Update Catalog using the search string Intel 82945G Express then ordering by version number. You’ll need to use Internet Explorer because it requires an ActiveX control to be installed. You’ll see there are two corresponding downloads. Add them both to the basket – one is the x86, the other is x64 but you won’t be able to tell them apart until they’re downloaded.

People building machines from a deployment image will therefore need to make sure that the newest Intel Display driver  is not added to their WIM or unattended build if it will be used on PCs with 945G chipsets. In the case of my unattended, I add drivers specifically by WMI model string so I shall move the Intel driver out of the Common folder and add it only to those builds which need it. I guess another issue will be that Windows Update will offer the newer Intel driver too.

UPDATE 2 – I have built another workstation from an unattended install with that 8.15.10.1912 driver and it also exhibits the Flash flickering problem (even though it’s fine on a system built by hand). So it looks like something to do with how the driver is added during the offlineServicing phase that is causing the problem. Once again, this does not affect Intel GMA drivers added during unattended installs for other non-GMA 950 chipsets. So for now I am leaving all OptiPlex GX620 systems on the generic Windows-included driver.

DXVA VC-1 playback on Intel GMA 500

This will only work on Vista or Windows 7. I suggest using the following test clips since they are already on your computer if using Windows 7:

  • C:\Users\Public\Videos\Sample Videos\Wildlife.wmv
  • C:\Windows\Performance\WinSAT\Clip_1080_5sec_VC1_15mbps.wmv

As you can see from the DXVA Checker tool, the GMA 500 can decode VC-1 in hardware. Though Windows 7 includes DXVA hardware assisted playback of H.264 out of the box, for some reason it only considers the GMA 500 capable of VC-1 motion compensation acceleration which is a small part of the entire decode process – so VC-1 playback is choppy.

The good news is that for Windows Vista Intel released a bundle of DXVA codecs for the GMA 500. They’re not available from the Intel drivers website but fortunately Sony’s US site has them. The installer will only extract the drivers if it’s running on a Vaio P, but you can use a tool like Universal Extractor to unpack them (look in \tempexefolder). On Windows 7 you will need to run Setup.exe in Vista compatibility mode otherwise it will fail.

Once the decoder is installed you may notice that you cannot get it to work in Media Player Classic Home Cinema, even by forcing it to be the preferred decoder (as with H.264 in my other post). This is because MPC-HC works with the DirectShow multimedia framework, but the Intel VC-1 decoder is written for Media Foundation – Microsoft’s replacement framework which launched with Windows Vista.

This unfortunately means that you’re limited to using Windows Media Player for hardware accelerated VC-1 content, so subtitles are not going to be possible. The next problem is that WMP aggressively selects its own decoder in favour of the Intel one. There is no neat way to set preference order as with DirectShow, so we need to make some Registry edits.

Open Regedit and navigate to HKLM\Software\Classes\MediaFoundation\Transforms\Preferred.

Export the whole branch and keep it somewhere safe (say foundation-orig.reg). Still in Regedit, right-click on this Preferred key and edit the permissions. Take ownership (Advanced > Owner tab), then grant Full Control to Administrators.

At the level \Transforms notice that there is an entry with a long alphanumeric CLSID for each registered decoder. Find the one called WMVideo Decoder MFT, which should be {82d353df-90bd-4382-8bc2-3f6192b76e34}. Find the CLSID for Intel® Media Codecs VC-1 Decoder for Intel® System Controller Hub, which ought to be {2b53d708-ffe1-4da3-b3a8-f8ec247c374f}.

Using Notepad, load the registry backup of the Preferred key you exported. This is a list of video formats also represented by CLSIDs, together with the CLSID of the decoder which will be used to play them back. So all we need to do is replace all instances of {82d353df-90bd-4382-8bc2-3f6192b76e34} with {2b53d708-ffe1-4da3-b3a8-f8ec247c374f} and save as foundation-mod.reg (always keep the original just in case!). Then double-click it and commit the changes.

Now if you run DXVA Checker and click on Check DirectShow/MediaFoundation Decoders at the bottom and browse to a VC-1 clip, you should see the following:

Intel Media Codec VC-1 DXVA

Note that some guides will tell you to take ownership then rename the file C:\WINDOWS\SYSTEM32\WMVDECOD.DLL which may well achieve the same result, but it will break the Windows Experience Index test process – it plays a WMV clip with this decoder during the benchmark and will fail with an error if that file is missing.

By switching between the original and modified .reg files and comparing playback you’ll notice that the Intel VC-1 decoder uses around 50% CPU on a 1.33GHz Atom Z520 Vs. 100% and stuttering with the Windows one.

Update – the Intel decoder seems to have difficulty rendering crossfades, as you can see from the artifacting while playing this nVidia demo clip and some of the content on the Microsoft WMV HD content showcase. It’s a shame the decoder doesn’t seem to be actively maintained, however all of these clips are years old so perhaps they were encoded with immature encoders.

Update 2 – I have since noticed that the clips from Microsoft’s showcase and that nVidia one are not in fact VC-1. They’re WMV3 which was a slightly earlier codec. The true VC-1 clips which I have tried are decoded without artifacts. You can check the video codec used in a file by running ffmpeg -i on them.

Continue to DXVA H.264 playback on Intel GMA 500 with subtitles (Windows 7)