rallyunlimited-engine/docs/q3url_add.cmd
2024-02-02 19:46:17 +03:00

15 lines
No EOL
457 B
Batchfile

@echo off
set CWD=%~dp0
set CWD=%CWD:~0,-2%
set CWD=%CWD:\=\\%
set F=%TEMP%\q3a.reg
set RPATH=HKEY_CURRENT_USER\Software\Classes\q3a
rem set RPATH=HKEY_CLASSES_ROOT\q3a
echo REGEDIT4 > %F%
echo [%RPATH%] >> %F%
echo @="URL:Q3A (Quake III Arena)" >> %F%
echo "URL Protocol"="" >> %F%
echo [%RPATH%\shell\open\command] >> %F%
echo @="\"%CWD%\\quake3e.exe\" +set fs_basepath \"%CWD%\" +set fs_homepath \"%CWD%\" +connect \"%%1\"" >> %F%
regedit -s %F%
del %F%