Stop "DOS" programs from "Close on exit"


  1. Posts : 34
    Win7 Ultimate x32
       #1

    Stop "DOS" programs from "Close on exit"


    In windows XP and earlier, the Windows had an option in Properties.
    you could tell the Dos like programs weather or not to "Close on exit".

    But, in windows 7, there is no checkbox for this in the program propteries.

    How do i stop cmd.exe, and programs that execute in a DOS style box, from "Close On Exit" ?

    too often i'm missing output that i need to see!
      My Computer


  2. Posts : 6,285
    Windows 10 Pro X64
       #2

    Use cmd /k command_to_run

    e.g.
    cmd /k dir
    cmd /k ipconfig /all
      My Computer


  3. Posts : 34
    Win7 Ultimate x32
    Thread Starter
       #3

    Ztruker said:
    Use cmd /k command_to_run

    e.g.
    cmd /k dir
    cmd /k ipconfig /all

    that does not help if i click on a program (such as "You think this is Not a Virus.exe") and it runs in it's own cmd window then closes and exits it's cmd window before you can read what it said (such as "Haha, you're infected in excatly c:\gotcha.txt")

    likewise, .BAT won't help because i would have to spend several weeks hunting down all my .exe's and making .bat's for them.

    in windows XP ALL programs that used the cmd window had the "Close On Exit" checkbox option in properties. but it's gone in Win7. there must be a work around somewhere!
      My Computer


  4. Posts : 6,285
    Windows 10 Pro X64
       #4

    I just read this: Just press the Shift button while starting the program, and the cmd window will stay open.

    I don't have an .exe that open a Command Prompt window so no way to test it. Let me know if this works.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 09:32.
Find Us