@ECHO OFF :: RxAssoc.bat, Version 2.00 for Windows NT :: Define a file type and association for Rexx scripts and add :: the .REX extension to the environment variable PATHEXT. :: Written by Rob van der Woude :: http://www.robvanderwoude.com SETLOCAL ECHO. ASSOC .rex=ReginaRexxScript FTYPE ReginaRexxScript=REGINA.EXE %%1 %%* SET Added=0 FOR %%A IN (%PathExt%) DO IF /I "%%A"==".REX" SET Added=1 IF "%Added%"=="0" SET PATHEXT=%PATHEXT%;.REX (ECHO REGEDIT4)>%Temp%.\RxAssoc.reg (ECHO.)>>%Temp%.\RxAssoc.reg (ECHO [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment])>>%Temp%.\RxAssoc.reg (ECHO "PATHEXT"="%PathExt%")>>%Temp%.\RxAssoc.reg REGEDIT /S %Temp%.\RxAssoc.reg DEL %Temp%.\RxAssoc.reg ECHO. ECHO The .REX extension has been added to the environment variable PATHEXT. ECHO This means you no longer have to type the .REX extension to start the ECHO Rexx script, just like typing COMMAND is enough to start COMMAND.COM. ECHO However, since PATHEXT is a HKEY_LOCAL_MACHINE registry setting this ECHO change won't take effect until you reboot the system. ENDLOCAL