$ESCAPECHARS ON
$TYPECHECK ON
$INCLUDE "SetFileAssociation.Inc"
IF MESSAGEDLG("ARE YOU SURE YOU WANT TO ASSOCIATE\n\nYOUR \".BAS\" FILES WITH THE NOTEPAD.EXE" _
, 0, 4 OR 8, 0) = 2 THEN
PRINT "\n *** NOTHING DONE ***"
GOTO QUIT
END IF
IF SetFileAssociation (".Bas", "C:\\Windows\\NotePad.Exe %1") <> 0 THEN
PRINT ("\n *** File Association Made Successfully ***")
ELSE
PRINT ("\n *** File Association Failed (File Extension passed Empty or too Long)***")
END IF
QUIT:
DEFSTR sExit
INPUT "\n\n CR to QUIT \n\n", sExit
Application.Terminate
END
|