I have scripted RunFile.bat to open a document in its' associated application, or if there is no association, in Notepad.exe.

The syntax for using RunFile.bat is:

call RunFile FileName \[/WAIT\]

Where:

<b>FileName</b> is the file that you wish to open in its' associated application,
         like File.doc opening in Microsoft Word, and File.pdf opening in Acrobat Reader.
         If no association exists, the file is opened in <b>Notepad.exe</b>.

<b>/WAIT</b>    is an optional parameter that causes <b>RunFile.bat</b> to wait until you close the application before returning.
RunFile.bat contains:
@echo off
if \{%1\}<h1><a name="_echo_Syntax_RunFile_FileName_WAIT_amp_goto_EOF_if_not_exist_1_echo_Syntax_RunFile_1_NOT_found_amp_goto_EOF_if_2_">\{\} @echo Syntax: RunFile FileName \[/WAIT\]&goto :EOF
if not exist %1 @echo Syntax: RunFile - %1 NOT found.&goto :EOF
if \{%2\}</a></h1>\{\} goto no2
if /i \{%2\}==\{/WAIT\} goto no2
@echo Syntax: RunFile %1 %2 - %2 NOT /WAIT.
goto :EOF
:no2
setlocal
set type=N
call :typeOK %1>nul 2>&1
if "%type%" EQU "N" goto BAD
start "" %2 %1
endlocal
goto :EOF
:BAD
start "" %2 notepad.exe %1
endlocal
goto :EOF
:typeOK
for /f "Tokens=*" %%x in ('assoc %~x1') do (
 set type=Y
)