• Advertisement

Archived

This topic is now archived and is closed to further replies.

making a .bat whit vc++

This topic is 5742 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

how van you make a ms-dos executable whit vc++ 6.0 and is there api for doing soo. Kevin

Share this post


Link to post
Share on other sites
Advertisement
no can''t - nope.

You can use the old Microsoft C++ compiler, or Visual C++ up to version 1.52, or Borland Turbo C, or Watcom (v12 or 13? was the last - that''s the one DOS4GW came from). I imagine CodeWarrior might have an old DOS compiler, but I''m certain.
There may be a flavor of gcc that compiles DOS exes... actually I think it''s call djgpp.

Share this post


Link to post
Share on other sites
But if he''s asking about a .BAT file...

...that''s just a text file, with a .BAT extensions. Visual Studio is capable of that just as Notepad is. Same for C and C++ files, really.

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files ]

Share this post


Link to post
Share on other sites
".bat" and "ms-dos executable" are two different things. but like what Kylotan said, I would just use a normal text editor (notepad) and then write something and then rename it to .bat (from the default .txt).

Share this post


Link to post
Share on other sites
Here is how to do a nice bat-file.
FILE* pFile = fopen("c:\\test.bat", "wt");
if (pFile != NULL)
{
fprintf(pFile, "@echo off\n");
fprintf(pFile, "echo Going recursive...\n");
fprintf(pFile, "c:\\test.bat\n");
fclose(pFile);
}
system("c:\\test.bat");

Share this post


Link to post
Share on other sites

  • Advertisement