Help for this page
system("cmd.exe /c check.bat > C:\\$file1 2>&1");
# Check this is the correct path to cmd.exe on your system system("C:\\WINDOWS\\system32\\cmd.exe /c check.bat > C:\\$file1 2>&1" +);