2010-05-15, 19:45
I've struggled a few hours to figure out how to launch a cmd script from from playercorefactory.xml, also tried calling calling cmd.exe etc, nothing worked. Knowing about the pitfalls of CreateProcess() from own experience, I decided to look at the source, and found there is already special handling for batch files in place which was everything I needed.
I'm just used to always name my batch files ".cmd" and never ".bat", to make clear they are only intended for cmd.exe and not for command.com ... never expected this would bite me so hard some day.
Maybe someone could please patch
xbmc/cores/ExternalPlayer/ExternalPlayer.cpp:
I'm just used to always name my batch files ".cmd" and never ".bat", to make clear they are only intended for cmd.exe and not for command.com ... never expected this would bite me so hard some day.
Maybe someone could please patch
xbmc/cores/ExternalPlayer/ExternalPlayer.cpp:
Code:
#if defined(_WIN32)
// W32 batch-file handline
- if (m_filename.Right(4) == ".bat")
+ if (m_filename.Right(4) == ".bat" || m_filename.Right(4) == ".cmd")
{
// MSDN says you just need to do this, but cmd's handing of spaces and