Andrea,
That's the code route I'd take too.
Here's a different version that won't error if the wav file is not found.
(defun playwav (wavfile / WAV)
(vl-load-com)
(if (and (findfile wavfile)
(= (strcase (vl-filename-extension wavfile)) ".WAV")
(setq WAV (vlax-create-object "Wscript.Shell"))
)
(progn
(vlax-invoke
WAV
"run"
(strcat "sndrec32 /play /close \"\" " wavfile)
T
)
(vlax-release-object WAV)
)
)
)