In the following statement :
system("%TESTCASES_PATH%SIP\\test.bat");
the %TESTCASES_PATH% gets resolved to "C:\Program Files..." .
As such the result of calling the system is :
"'C:\Program' is not recognized as an internal or external command.."
'C:\Program' is thought as a executable..
How to overcome the above issue?
EDIT: Trying out what is proposed in the answers, I get to see the same behavior. The following is the actual code:
#include <stdio.h>
#include<conio.h>
int main()
{
system("\"%TESTCASES_PATH%SIP\\Provisioning\\CrHomeDnOfficeCodeDestCodeBySoap\\CreateHomeDnOfficeCode.bat\"");
//system("\"%TESTCASES_PATH%SIP\\tests.bat\"");
getch();
return 0;
}