VLC distribution via Group Policy

VideoLANs VLC is one of the most powerful and in my mind, one of the best media players out there.  It’s opensource but they drive a lot of development of the H.264 codec which is prolific in just about every way.

One of the big annoyances how ever is, how the Hell do you roll this puppy out to Enterprise class networks… skipping the bull, how to roll to Microsoft Active Directory PCs??  Well there’s no MSI running around and I couldn’t be bothered to create one so I opted with a little script logic, whacked it in to GP under PC Start Up script and Bob, he is your Uncle.

Download the latest VLC from www.videolan.org, grab the ZIP pack and extract it.  Dump the VLC directory on to your server share in another directory called VLC (\\server\apps\VLC\VLC).  Make a copy of VLC.exe in to C:\program files\VLC\ and then create a shortcut from there in to c:\programdata\Microsoft\Windows\Start Menu\Programs\Media\ (this is a hidden folder).  Cut and paste your link you’ve created in to \\server\apps\VLC\.  Now time for the script, copy and paste in to a text file via notepad:

@echo off

if exist  “%programfiles%\vlc\vlc.exe” goto end
:: Copy VLC to Program Folder
xcopy \\server\apps\vlc\vlc “%programfiles%\vlc” /f /h /r /y /e /i

:: Copy shortcut to Start Menu\Media
copy \\server\apps\vlc\*.lnk “%programdata%\Microsoft\Windows\Start Menu\Programs\Media\” /y

:end

Now I don’t need my script to be very intelligent.  This literally checks to see if the VLC folder exists in Program Files and if it does, quits; else it copies over what it needs to install.  Save this in to \\server\apps\vlc and call it VLCInstall.cmd.

Fire up your GP Editor, new policy, VLC_Install, Settings Tab, Right click, edit, Computer Config, Policies, Windows Settings, Scripts, Startup.  Browser to your script, mine is at \\server\apps\VLC\vlcinstall.cmd and click ok, and close back out.  Link your policy to your group with a test PC and give it a whirl.

Script logic wise, if you’re being clever, use version numbers for the VLC, a la \\server\apps\VLC\VLC119 and you can then test for versions and install newer ones that way, or drop a text file in to “%programfiles%\vlc” called 119.txt, 120.txt, etc and check if it needs to be copied in again that way.

Published by

geekphreek

I'm the admin :)

6 thoughts on “VLC distribution via Group Policy”

  1. Pingback: Reklama prasowa
  2. Pingback: download
  3. I’m having some difficulty. The directory %programfiles%\vlc and the shortcut are not getting created on the client PC. I’m deploying to Win7 64bit using WS2008R2. If I check GP Results all it tells me is that it was successful. I’ve double checked the server share paths. Each path has the correct directory/files. From a client if I run \\hnfs\HNFILES\APPS\ClientApps\vlc\vlc-2.0.6\VLCInstall.cmd a cmd prompt box flashes then goes away without copying over the files.

    Here’s my script
    @echo off

    if exist “%PROGRAMFILES(X86)%\VLC\vlc.exe” goto end
    :: Copy VLC to Program Folder
    xcopy \\hnfs\HNFILES\APPS\ClientApps\vlc\vlc-2.0.6 “%PROGRAMFILES(X86)%\VLC” /f /h /r /y /e /i

    :: Copy shortcut to Start Menu\Media
    copy \\hnfs\HNFILES\APPS\ClientApps\vlc\*.lnk “%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs\Media\” /y

    :end

  4. Throw a “pause” at the end so you can see the output, or log the output so you can see what is the issue.

    It’s likely to be to do with permissions to where you are writing to.

  5. I get two errors. The first is about UNC not supported which I think is typical, but the other states “Invalid number of parameters. The syntax of the command is incorrect.”

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>