-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Install.bat
48 lines (39 loc) · 1.24 KB
/
Install.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@echo off
fsutil dirty query %SYSTEMDRIVE% >nul
If ERRORLEVEL 1 (
echo Run me as Administrator, please :3
goto hell
)
for /f "usebackq tokens=1 skip=1 delims=-" %%A in (`wmic os get osarchitecture 2^>nul`) DO (
set ARCH=%%A
goto heaven
)
:heaven
set KEY_NAME=HKLM\Software\VideoLAN\VLC
set VALUE_NAME=InstallDir
:: Searching for VLC
for /f "usebackq skip=2 tokens=1-2*" %%A in (`reg query %KEY_NAME% /v %VALUE_NAME% /reg:64 2^>nul`) do (
set VLC_PATH=%%C
set FOUND_ARCH=64
)
if not defined VLC_PATH (
for /f "usebackq skip=2 tokens=1-2*" %%A in (`reg query %KEY_NAME% /v %VALUE_NAME% /reg:32 2^>nul`) do (
set VLC_PATH=%%C
set FOUND_ARCH=32
)
if not defined VLC_PATH (
echo VLC not found. Please, install %ARCH%bit VLC ^(https://www.videolan.org/vlc/index.ru.html^) or use the Full verson.
goto hell
)
)
if %ARCH% NEQ %FOUND_ARCH% (
echo You have only %FOUND_ARCH%bit VLC. Please, install %ARCH%bit VLC ^(https://www.videolan.org/vlc/index.ru.html^) or use the Full verson.
goto hell
)
echo Using VLC installation: %VLC_PATH%
cd /D "%~dp0"
mklink libvlc.dll "%VLC_PATH%\libvlc.dll"
mklink libvlccore.dll "%VLC_PATH%\libvlccore.dll"
mklink /D plugins "%VLC_PATH%\plugins"
:hell
pause