How to deploy an .inf (VC1 Codec for WMP)

Comments

7 comments

  • Shane Corellian

    Hi Thomas,

    I am wondering if the pushd %DEST% is changing the working directory in Deploy. Have you verified that the wvc1dmo.inf file is copied out there during the xcopy?

    Try this: Create a backup of your bat file. Change the pushd command section to the following:

    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% dir >C:\DriverInst.log 2>&1 %DEST:~0,2% >>C:\DriverInst.log 2>&1 rem Call setupapi to perform installation dir >>C:\DriverInst.log 2>&1
    start /wait rundll32.exe setupapi,InstallHinfSection DefaultInstall.Nt 132 .\wvc1dmo.inf >>C:\DriverInst.log 2>&1

    After the deployment go to the C:\ on the target computer and grab that log file. Did the PUSHD command change the directory? What was the output of the rundll32 command?

    0
    Comment actions Permalink
  • Thomas Santillan

    Sorry, I forgot to mention that I had also 'dumbed down' the script during my troubleshooting in an attempt to rule out stuff like that not working. For example:

    [code]

    @echo off

    mkdir C:\temp\

    xcopy "\\server\directory\*.*" "c:\temp\" /y

    cd c:\temp

    start /w rundll32.exe setupapi,InstallHinfSection DefaultInstall.Nt 132 .\wvc1dmo.inf

    start /w regsvr32 /s %SystemRoot%\system32\wvc1dmod.dll

    cd\

    remdir /s /q c:\temp

    [/code]

    That script didn't seem to work either (It works when run directly from the computer, just not when run using PDQ deploy).

    I've attached the output of the script using the modifications you mention. If I'm reading it correctly, it looks like the files aren't being copied over.

    0
    Comment actions Permalink
  • Shane Corellian

    It looks like the files aren't being copied over to your TMP directory. Since you are using XCOPY make sure to use a /I (uppercase i). This way it will create the subfolder if it doesn't exist.

    The other thing I would try if I were you is this:

    Place your vc1install.bat file in the same directory as your wvc1dmo.inf file (on the network share). Check the Include Entire Directory checkbox for this Step. 

    Have your bat file only call these commands 

    reg query "HKCR\Software\Microsoft\Multimedia\Components\Installed\codec_wvc1dmo\Uninstall"> NUL 2>NUL
    if errorlevel 1 goto do_install
    goto end
    
    :do_install
    start /wait rundll32.exe setupapi,InstallHinfSection DefaultInstall.Nt 132 .\wvc1dmo.inf
    regsvr32 /s %SystemRoot%\System32\wvc1dmod.dll

    :end

    Don't have any pushd or xcopy commands in the script. This way the working directory (where the bat file is called) will also contain the inf file. When the deployment is finished these files will all be deleted. 

    When you run this bat file locally (ouside of Deploy) are there any prompts that you need to approve? Any windows that pop up asking to allow a new driver? If there are then you would need to account for these when deploying. This usually means add a new drivers certificate to your certmgr or other steps to prevent windows from popping up.

    0
    Comment actions Permalink
  • Thomas Santillan

    Sorry for the delay. People keep interrupting.

    When running this new script directly from the PC, it works perfectly. No prompts and I'm able to play the test file. When running from PDQ deploy, it gives an Error 3. However, if I slightly modify it so that it reads like so:

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

    :do_install
    start /wait rundll32.exe setupapi,InstallHinfSection DefaultInstall.Nt 132 .\wvc1dmo.inf
    start /wait regsvr32 /s %SystemRoot%\System32\wvc1dmod.dll

    :end

    It then says it's successful. However, when you try to play the test file, it then attempts to download the codec from Microsoft.

    0
    Comment actions Permalink
  • Thomas Santillan

    Well, since I'd been unsuccessful getting this to work using PDQ deploy, I've found a way to deploy this using PSExec. I basically just run a small batch script file, which then runs PSExec along with a text file that has the computer names to deploy to and the batch script that then copies and installs the files.

     

    The initial script is this:

    @echo off

    REM Call PSExec and run batch scripts.
    PSExec @computerlist.txt -s -i -c -accepteula "\\server\share\install.bat"

     

    The install.bat contains:

    SET SRC=\\server\share\vc1codec
    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

     

    I'm now able to play the test file on that system. Now, I'm not sure what the deal is, but it didn't work until I added the "-i" switch, which runs the program so that it interacts with the desktop of the specified session on the remote system. If no session is specified the process runs in the console session.

    There aren't any dialog boxes that need any buttons to be pushed, just a simple progress box that pops up. So, apparently that box being suppressed causes it to fail.

    0
    Comment actions Permalink
  • Shane Corellian

    Thanks for following up. It looks like this needs to be run as the Logged On User. Did you try that? You can go to the Options of the Step (in your PDQ Deploy package) and select Run as Logged On User. If this requires Admin rights (and the logged on user doesn't have them) then you'd need to still Run as Logged On User but then use something like PSExec to run as an Administrator (while still using the Logged On User's environment.

    0
    Comment actions Permalink
  • Thomas Santillan

    I hadn't tried that as it does require admin rights. While I'm glad I have something that "works", I still have the issue of needing someone logged on in order for it to work. I can't wait to be rid of these darn XP boxes. Thanks for the help!

    0
    Comment actions Permalink

Please sign in to leave a comment.