Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: How do i get rid of the "Press any key to continue..." on Windows 7  (Read 2983 times)

0 Members and 1 Guest are viewing this topic.

x_milind

    Topic Starter


    Newbie

    • Experience: Beginner
    • OS: Unknown
    Hello,
     I'm writing a batch script on windows, where i'm performing the following:

    call abc.exe
    call def.exe

    After it runs the abc.exe, i get a message "Press any key to continue", and only after the key is pressed, it executes the def.exe.
    How do i get rid of the "Press any key to continue" after abc.exe?

    Regards,
    Milind

    Sidewinder



      Guru

      Thanked: 139
    • Experience: Familiar
    • OS: Windows 10
    Re: How do i get rid of the "Press any key to continue..." on Windows 7
    « Reply #1 on: July 11, 2012, 06:17:53 AM »
    The "Press any key to continue" message is generated by a pause statement in batch. You don't have one, so I'm thinking the abc program is putting out the message.

    You might try piping a key into the abc program:

    Code: [Select]
    echo. | abc
    def

    No guarantees, but stranger things have worked!

    FWIW: call is used to tranfer control to other batch files with the expectation of returning to the original batch file (the caller). It's not necessary when running exe files.

     8)

    « Last Edit: July 11, 2012, 06:34:03 AM by Sidewinder »
    The true sign of intelligence is not knowledge but imagination.

    -- Albert Einstein