maybe because if the message length is longer than 1100 (i think thats maximum), the program will crash...but.. to work around it, just set a strlen if...
size_t len;
len = strlen(sCommandArg);
if (len < 1094)
{
//do whatever you want
}
else
{
MessageBox(NULL, "Maximum message length exceeded!", "WARNING!", MB_OK);
}
If u do the math (and i hope i did it correctly..
).. considering the message length should not exceed 1100 chars... the /xcopy command has 6 characters +1 space, so 7 (no null). Next, your full message can only be 1001(with null) - 7 = 1094...