Have you tried using the dos format of the dir structure?
Ex:
c:\progra~1\mirc\mirc.exe
Yes, that is what $shortfn() does. And yes, I realise the problem is not mIRC's. At first I thought it was, since it didn't happen in command prompt, but obviously it's not mIRC directly sending to the command prompt.