Deploying VC-1 Video Codec for Windows Media Player 10 (wvc1dmo.cab)

How to deploy from command line a VC-1 Video Codec for Windows Media Player 10?

It is normally installed while visiting a page containing video encoded in VC-1, like this one (Eurovision 2009 video, not for the faint of heart, beware). But this requires administrative privileges and is interactive so impractical on many workstations.

IE downloads a file wvc1dmo.cab containing wvc1dmo.inf and wvc1dmod.dll and installs it somehow. But how to do this from command line, unattended?

Answer

Quick and dirty way – Extract the files and run:

rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 wvc1dmo.inf

I’d probably package the DLL into an MSI and deploy it that way.

Edit:

Rundll32 doesn’t seem to want to run unless the path to the INF is specified as “.\wvc1dmo.inf”. Even then, the INF installer (invoked from the command-line or from right-click / Install) doesn’t actually register the DLL! Here’s a deployment script that can be placed into a share on a server comptuer and invoked as a startup script. (I think, for my networks, I’d still deploy this thing in an MSI, but I don’t have time to build an MSI this morning).

@echo off
SET SRC=\\test-pc01\foo
SET DEST=%TEMP%\%RANDOM%.TMP

rem Query for installation
reg query "HKCR\Software\Microsoft\Multimedia\Components\Installed\codec_wvc1dmo\Uninstall"> NUL 2>NUL
if errorlevel 1 goto do_install
goto end

:do_install
rem Make temporary directory and copy down files
mkdir "%DEST%"
xcopy "%SRC%" "%DEST%" /y

rem Change directory and drive to destination location (as setupapi has to be called with
rem current directory .\ specified on command line. Dumb, dumb, dumb...)
pushd %DEST%
%DEST:~0,2%

rem Call setupapi to perform installation
start /wait rundll32.exe setupapi,InstallHinfSection DefaultInstall.Nt 132 .\wvc1dmo.inf

rem Dumb thing doesn't seem to register itself
regsvr32 /s %SystemRoot%\System32\wvc1dmod.dll

popd

rem Remove temporary files
rmdir /s /q "%DEST%"

:end

That works, and my conscience is somewhat clearer. Next time, I’ll test a little more before I go posting an “answer”. My apologies.

Attribution
Source : Link , Question Author : Tometzky , Answer Author : Evan Anderson

Leave a Comment