Quote:
Originally Posted by SaswatPadhi View Post
You can do that this way :


Code: C++
</p>
<p>system("Temp.bat");</p>
<p>



In case, you need to provide full path to the bat file, remember to use double backslashes (\\) instead of a single one (\) in the path. For example :


Code: C++
</p>
<p>system("C:\\Temp\\Temp.bat");</p>
<p>
But i don't want to define the Path ,i mean that i need a code that opens that file at the same path of the programme.

Example:The programme is in that path C:\\CPP\\CPP.exe in my computer ,but if i ran it on another computer of course it won't be at the same path as my computer's ,so the system will not find the file C:\\CPP\\Temp.bat given that the Temp.bat is in another location.

got it?