@echo off

rem Add Windows registry entries to invoke MinEd from Explorer context menu

rem todo: install to %PROGRAMFILES%\MinEd

set command="D:\bin\min\bin\mintty -oLocale=C -oCharset=UTF-8 -oUseSystemColours=1 -oBoldAsBright=0 -oScrollbar=0 -oWindowShortcuts=0 -oZoomShortcuts=0 -e /bin/mined %%1"

set rootkey=HKEY_CLASSES_ROOT\SystemFileAssociations\text\shell\MinEd\command
set userkey=HKEY_CURRENT_USER\Software\Classes\SystemFileAssociations\text\shell\MinEd\command

reg add %rootkey% /f /ve /d %command%
if errorlevel 1 reg add %userkey% /f /ve /d %command%

