-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBSPSourceContext.bat
More file actions
34 lines (27 loc) · 1.3 KB
/
BSPSourceContext.bat
File metadata and controls
34 lines (27 loc) · 1.3 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
@echo off
title BSPSourceContext
REM Проверка на запуск от имени администратора
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
if '%errorlevel%' NEQ '0' (
title BSPSourceContext - Error
echo Run this file as an administrator!
pause>nul
exit /b
)
REM Существует ли bspsrc.jar
if not exist "%~dp0\bspsrc.jar" (
title BSPSourceContext - Error
echo Could not find bspsrc.jar!
pause>nul
exit /b
)
title BSPSourceContext - Installing...
REM Записываем значения в реестр HKEY_CLASSES_ROOT\SystemFileAssociations\.bsp\shell\decompile
reg add "HKEY_CLASSES_ROOT\SystemFileAssociations\.bsp\shell\decompile" /f /v MUIVerb /d "Decompile"
reg add "HKEY_CLASSES_ROOT\SystemFileAssociations\.bsp\shell\decompile" /f /v Icon /d "\"%~dp0icon.ico\""
REM Записываем значение в реестр HKEY_CLASSES_ROOT\SystemFileAssociations\.bsp\shell\decompile\command
reg add "HKEY_CLASSES_ROOT\SystemFileAssociations\.bsp\shell\decompile\command" /f /ve /d "\"%~dp0runtime\bin\java\" -jar \"%~dp0bspsrc.jar\" \"%%V\""
REM Всё готово!
title BSPSourceContext - Installing complete!
echo For the changes to take effect, you may need to restart your computer!
pause>nul