Two commands, ASSOC and FTYPE, allow you to manage file associations from a command prompt (or in a batch file).
Typing ASSOC, without parameters, displays the currently defined extensions. Type Assoc .wav to display the .wav file association. Typing assoc .wav= will delete the .wav association.
Typing FTYPE without options displays the file types that have defined open command strings. Ftype SoundRec will display the open command string for the file type SoundRec. Typing ftype SoundRec= will delete the open command string.
To define a new association for .log files which you want to open with notepad:
assoc .log=LogFile
ftype LogFile=%Systemroot%\System32\notepad.exe %1
For a complete explanation, type ftype /? at a command prompt.