Jump to content
  • Advertisement

Archived

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

Guest Anonymous Poster

Question??

This topic is 6975 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

IIRC the ANSI C command is exec().

There's also an obsolete function called WinExec()... look it up in the docs and it should point you to the new way of doing it (CreateProcess, I think?)

Mason McCuskey
Spin Studios
www.spin-studios.com

Share this post


Link to post
Share on other sites
Advertisement
If this is a Win32 app, ShellExecute() or ShellExecuteEx() would be the prefered ways to launch a BAT or EXE file. The first one is a bit easier to use, IMHO but I think the "microsoft" way to do things nowadays is with the later. Also, WinExec() is *really* easy to use and most compilers nowadays should just be wrapping that name over a call to ShellExecute() to provide overall compatibility. So I think WinExec() is still safe to use. Hope this helps.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I like to use execl

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I was just wondering if there is a way to run a *.bat file or *.exe file from within a C++ program? I've looked through my reference book, but I couldn't find anything that would do this.

Thanks
Mike

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!