REM To install, place this bat in your QB folder,
REM right click on a .bas file and choose the
REM program to open with. Navigate to and select
REM this batch file. Then make sure you check
REM the "Alway use the selected program..." box.
REM After that you can just run .bas files in
REM Windows Explorer.
TITLE "%~n1" is now running...
REM Start in your file's folder
REM Change the path to QB on your computer
C:\QBasic\QB.exe /L /RUN %~nx1
TITLE WE NOW RETURN YOU TO YOUR SYSTEM
Save this file as qbrunner.bat in your QB install folder.
Next, right click on a .bas file. Select "Open With > Choose Program..."
In the window that pops up, click the "Browse..." button.
Navigate to qbrunner.bat and press "Open".
Back in the "Open With" dialog, check the "Always use..." box and click "OK".
Now, when you double click a .bas file in Windows Explorer your code will be interpreted by QB.
If you do not want the QB environment to open when the .BAS file is done, use keyword SYSTEM instead of END.
This file can be found HERE.