-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.bat
More file actions
48 lines (42 loc) · 1.6 KB
/
install.bat
File metadata and controls
48 lines (42 loc) · 1.6 KB
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
setlocal
:: Vérifier si on est admin
net session >nul 2>&1
if %errorlevel% neq 0 (
echo Redemarrage du script avec les droits administrateur...
powershell -Command "Start-Process '%~f0' -Verb runAs"
exit /b
)
set "folder=%~dp0"
:: Remplacer \ par \\
setlocal enabledelayedexpansion
set "line=%folder%"
set "line=!line:\=\\!"
endlocal & set "folder=%line%"
:: Créer le fichier .reg
set "regfile=ajout_contextuel_handbrake.reg"
(
echo Windows Registry Editor Version 5.00
echo.
echo [HKEY_CLASSES_ROOT\SystemFileAssociations\.mp4\shell\RightClicCompress]
echo "MUIVerb"="Compresser avec RightClicCompress"
echo "SubCommands"=""
echo.
echo [HKEY_CLASSES_ROOT\SystemFileAssociations\.mp4\shell\RightClicCompress\shell\Classique]
echo @="Compression classique"
echo [HKEY_CLASSES_ROOT\SystemFileAssociations\.mp4\shell\RightClicCompress\shell\Classique\command]
echo @="\"%folder%compresser_mp4.bat\" \"%%1\""
echo.
echo [HKEY_CLASSES_ROOT\SystemFileAssociations\.mp4\shell\RightClicCompress\shell\Fort]
echo @="Compression forte"
echo [HKEY_CLASSES_ROOT\SystemFileAssociations\.mp4\shell\RightClicCompress\shell\Fort\command]
echo @="\"%folder%compresser_fort_mp4.bat\" \"%%1\""
echo.
echo [HKEY_CLASSES_ROOT\SystemFileAssociations\.mp4\shell\RightClicCompress\shell\Discord]
echo @="Compression < 10Mo"
echo [HKEY_CLASSES_ROOT\SystemFileAssociations\.mp4\shell\RightClicCompress\shell\Discord\command]
echo @="\"%folder%compresser_pour_discord_mp4.bat\" \"%%1\""
) > "%regfile%"
:: Importer la clé
regedit /s "%regfile%"
echo Clé de registre importée avec succès.