Using techniques from tip 3613 and tip 0108, I have scripted NeverShowExt.bat.

USAGE: NeverShowExt .ext

where .ext is the extension you wish to hide, such as .txt.

NeverShowExt.bat contains:

@echo off
if \{%1\}<h1><a name="_goto_syntax_set_ext_1_set_ext_ext_set_wrk_ext_if_wrk_EQU_ext_goto_syntax_for_f_Tokens_2_Delims">\{\} goto syntax
set ext=%1
set ext=%ext:"=%
set wrk=%ext:.=%
if "%wrk%" EQU "%ext%" goto syntax
for /f "Tokens=2 Delims</a></h1>" %%i in ('assoc %ext%') do call :reg %%i
goto :EOF
@echo Syntax: NeverShowExt .ext
goto :EOF
if \{%1\}==\{\} goto syntax
@echo Windows Registry Editor Version 5.00>%TEMP%\NevershowExt.reg
@echo \[HKEY_CLASSES_ROOT\%1\]>>%TEMP%\NevershowExt.reg
@echo "NeverShowExt"="">>%TEMP%\NevershowExt.reg
regedit /s %TEMP%\NevershowExt.reg