A problem pops up getting it to actually play.. I have no idea what (combination of) flags 0x0465 is supposed to be.. but it's possible that it is an ANSI-specific (combination of) flags, with Unicode equivalents somewhere.
But eyeing the MCI docs at MSDN tells me that it's probably better to just send MCI_PLAY for a simple single play anyway.
But just to take things from the top...
1. Your Script is setting the output path to $PLUGINSDIR, but you don't have InitPluginsDir anywhere before that. Add that first, just to be safe.
2. Your system call then tries to load your sound file from $TEMP... replace that with $PLUGINSDIR.
So now on to the actual commands... If you compile this as is, it will still say it can't find the file. That's because of using MCIWndCreate instead of MCIWndCreateW.
3. Replace MCIWndCreate with MCIWndCreateW
If you try now, you'll see that the file does get loaded okay, but it can't understand the "play" command ("The driver cannot recognize the specified command."). I don't know why not. But, as mentioned above, we can use MCI_PLAY instead.
4. Replace...
SendMessage $hmci 0x0465 0 "STR:play" with !define MCI_PLAY 0x806
SendMessage $hmci ${MCI_PLAY} 0 0 The sound file should then play.