DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Figured out how to keep the cmd window open, i.e. stop it from closing.  (Read 9,692 times)

jinxx

  • Supporting Member
  • Joined in 2014
  • **
  • Posts: 10
Probably not news to most of you but took me ages to figure out, to run a cmd window without it closing itself use:
Code
    shellexec cmd.exe /k $$1

because you're running the /k flag on cmd.exe it won't close until cmd.exe "exits" via you closing it. As opposed to running the /k on your application, which for something like ipconfig just instantly closes

dreftymac

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 17
This is a good reminder, thanks for the post.

Original address: https://www.donationcoder.com/forum/index.php?topic=50929.0