Skip to content

Instantly share code, notes, and snippets.

@louy2
Last active March 10, 2016 09:24
Show Gist options
  • Save louy2/9bfbee657b9d660022b0 to your computer and use it in GitHub Desktop.
Save louy2/9bfbee657b9d660022b0 to your computer and use it in GitHub Desktop.
Install Blu-ray support for VLC media player on Windows
:: Name: installBluraySupport.cmd
:: Purpose: Install Blu-ray support for VLC media player on Windows
:: Usage: 1. Install VLC media player https://www.videolan.org/vlc/download-windows.html
:: * Install 64-bit version for 64-bit system, or this script doesn't work
:: 2. Download corresponding files from http://vlc-aacs.whoknowsmy.name/
:: 3. Put them under the same folder as this script
:: 4. Execute the script
@echo off
if not exist %PROGRAMDATA%\aacs (
mkdir %PROGRAMDATA%\aacs
copy .\KEYDB.cfg "%PROGRAMDATA%\aacs\KEYDB.cfg"
)
setlocal ENABLEEXTENSIONS
set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\VideoLAN\VLC"
set VALUE_NAME=InstallDir
:: Get install location of VLC from registry
FOR /F "usebackq skip=2 tokens=1-3*" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul`) DO (
set ValueValue=%%C
)
if defined ValueValue (
:: Always overwrite by /Y
copy /Y .\libaacs.dll "%ValueValue%\libaacs.dll"
) else (
@echo VLC video player is not installed
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment