-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcreate_windows_explorer_context_menu_entry.bat
73 lines (56 loc) · 2.92 KB
/
create_windows_explorer_context_menu_entry.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
@echo off
setlocal enabledelayedexpansion
set "SCRIPT_DIR=%~dp0"
set "SCRIPT_PATH=%SCRIPT_DIR%video-compressor.bat"
set "SCRIPT_PATH=!SCRIPT_PATH:\=\\!"
set "REGEDIT_FILE=%SCRIPT_DIR%add_to_windows_explorer_context_menu.reg"
set "BATCH_NAME=FFMPEG_VIDEO_COMPRESSOR_DAVISHIBA_APBR"
echo Windows Registry Editor Version 5.00> %REGEDIT_FILE%
echo [HKEY_CLASSES_ROOT\Directory\shell\CompressVideosDaviShibaAPBR]>> %REGEDIT_FILE%
echo @="Compress Videos in this Folder">> %REGEDIT_FILE%
echo [HKEY_CLASSES_ROOT\Directory\shell\CompressVideosDaviShibaAPBR\command]>> %REGEDIT_FILE%
echo @="\"%SCRIPT_PATH%\" \"%%1\"">> %REGEDIT_FILE%
regedit /s "%REGEDIT_FILE%"
set "SCRIPT_PATH=%SCRIPT_DIR%loop.bat"
set "SCRIPT_PATH=!SCRIPT_PATH:\=\\!"
set "REGEDIT_FILE=%SCRIPT_DIR%add_to_windows_explorer_context_menu_loop.reg"
echo Windows Registry Editor Version 5.00> %REGEDIT_FILE%
echo [HKEY_CLASSES_ROOT\Directory\shell\CompressVideosDaviShibaAPBR_LOOP]>> %REGEDIT_FILE%
echo @="Compress Videos in this Folder - LOOP">> %REGEDIT_FILE%
echo [HKEY_CLASSES_ROOT\Directory\shell\CompressVideosDaviShibaAPBR_LOOP\command]>> %REGEDIT_FILE%
echo @="\"%SCRIPT_PATH%\" \"%%1\"">> %REGEDIT_FILE%
regedit /s "%REGEDIT_FILE%"
set "SCRIPT_PATH=%SCRIPT_DIR%only-one-video-compressor.bat"
set "SCRIPT_PATH=!SCRIPT_PATH:\=\\!"
set "REGEDIT_FILE=%SCRIPT_DIR%add_to_windows_explorer_context_menu_one.reg"
echo Windows Registry Editor Version 5.00> %REGEDIT_FILE%
echo [HKEY_CLASSES_ROOT\SystemFileAssociations\.mp4\shell\%BATCH_NAME%]>> %REGEDIT_FILE%
echo @="Compress Video">> %REGEDIT_FILE%
echo [HKEY_CLASSES_ROOT\SystemFileAssociations\.mp4\shell\%BATCH_NAME%\command]>> %REGEDIT_FILE%
echo @="\"%SCRIPT_PATH%\" \"%%1\"">> %REGEDIT_FILE%
echo.
echo [HKEY_CLASSES_ROOT\SystemFileAssociations\.avi\shell\%BATCH_NAME%]>> %REGEDIT_FILE%
echo @="Compress Video">> %REGEDIT_FILE%
echo [HKEY_CLASSES_ROOT\SystemFileAssociations\.avi\shell\%BATCH_NAME%\command]>> %REGEDIT_FILE%
echo @="\"%SCRIPT_PATH%\" \"%%1\"">> %REGEDIT_FILE%
echo.
echo [HKEY_CLASSES_ROOT\SystemFileAssociations\.ts\shell\%BATCH_NAME%]>> %REGEDIT_FILE%
echo @="Compress Video">> %REGEDIT_FILE%
echo [HKEY_CLASSES_ROOT\SystemFileAssociations\.ts\shell\%BATCH_NAME%\command]>> %REGEDIT_FILE%
echo @="\"%SCRIPT_PATH%\" \"%%1\"">> %REGEDIT_FILE%
echo.
echo [HKEY_CLASSES_ROOT\SystemFileAssociations\.mkv\shell\%BATCH_NAME%]>> %REGEDIT_FILE%
echo @="Compress Video">> %REGEDIT_FILE%
echo [HKEY_CLASSES_ROOT\SystemFileAssociations\.mkv\shell\%BATCH_NAME%\command]>> %REGEDIT_FILE%
echo @="\"%SCRIPT_PATH%\" \"%%1\"">> %REGEDIT_FILE%
echo.
echo [HKEY_CLASSES_ROOT\SystemFileAssociations\.mov\shell\%BATCH_NAME%]>> %REGEDIT_FILE%
echo @="Compress Video">> %REGEDIT_FILE%
echo [HKEY_CLASSES_ROOT\SystemFileAssociations\.mov\shell\%BATCH_NAME%\command]>> %REGEDIT_FILE%
echo @="\"%SCRIPT_PATH%\" \"%%1\"">> %REGEDIT_FILE%
regedit /s "%REGEDIT_FILE%"
endlocal
echo.
echo Windows Explorer context menu items created successfully!
echo.
pause