Batch file not working as expected


  1. Posts : 605
    W7 Ultimate
       #1

    Batch file not working as expected


    The following batch file displays the txt but immediately erases. Why?

    @Echo off
    ECHO There have been 15 minutes or more of inactivity on this computer. Automatic LOGOFF will occur in 60 seconds.
      My Computer


  2. Posts : 10,485
    W7 Pro SP1 64bit
       #2

    If you want the execution of the batch file to pause - add pause on the last line.

    Code:
    @Echo off
    ECHO There have been 15 minutes or more of inactivity .....
    pause
      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 18:41.
Find Us