Hi, How can i execute a .BAT file using my C program.. When i try to execute using SYSTEM() , it's giving me "EXTENDED ERROR 183" is there any special way to execute .BAT files?? let me know soon. :pleased: Please help me out... thanks in advance...
The system() call only launches executables, and bat files aren't executable. Executable files end ONLY with .exe or .com. The executable for batch files is the command prompt, so you'll need something like system("cmd.exe -z myfile.bat"); - replace -z with whatever flag is needed to make cmd.exe run a batch file then exit.
thanks for ur help...... i got it Hw can we return any values to this Batch files from any other programs.. eg: from C hw can we retrun i got a idea that we can store somevalues from any program in a txt file and make the batch file to read it.. but without this is there any way??? Thanks in advance....