Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8992967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:05:12+00:00 2026-06-15T23:05:12+00:00

I have two batch files, one of them executes another, i.e. My Batch File

  • 0

I have two batch files, one of them executes another, i.e.

  1. “My Batch File” > 2. “Some Other Batch File”

I’ve created a shortcut of the first batch file and edited its properties to call its in following way.

cmd.exe /k "<SomePath>\<My Batch File>.bat" & pause

What i want to do
I want the console window to be open after the execution of the batch file is over. Now it just closes, tried to play around the cmd flags, no result.

Platform : Windows7


UPDATE 1

Modified the structure, the simple example like this does not work as well,
Only one batch file i.e. there is no the 2. “Some Other Batch File”
The only batch file contains smth like this

start /B /LOW /WAIT make package
cmd /K

UPDATE 2

The same shortcut which is invoked from Explorer does not close the console window.
But the console window closes when the shortcut is invoked from the pinned item on taskbar

Any ideas how to keep the console window open?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T23:05:13+00:00Added an answer on June 15, 2026 at 11:05 pm

    If that is really all the batch file is doing, remove the cmd /K and add PAUSE.

    start /B /LOW /WAIT make package
    PAUSE
    

    Then, just point your shortcut to "My Batch File.bat"…no need to run it with CMD /K.

    UPDATE

    Ah, some new info…you’re trying to do it from a pinned shortcut on the taskbar.

    I found this, Adding Batch Files to Windows 7 Taskbar like the Vista/XP Quick Launch, with the relevant part below.

    1. First, pin a shortcut for CMD.EXE to the taskbar by hitting the start button, then type “cmd” in the search box, right-click the result and chose “Pin to Taskbar”.
    2. Right-click the shortcut on the taskbar.
    3. You will see a list that includes “Command Prompt” and “Unpin this program from the taskbar“.
    4. Right-click the icon for CMD.EXE and select Properties.
    5. In the box for Target, go to the end of "%SystemRoot%\system32\cmd.exe" and type " /C " and the path and name
      of the batch file.

    For your purposes, you can either:

    1. Use /C and put a PAUSE at the end of your batch file.

      OR

    2. Change the command line to use /K and remove the PAUSE from your batch file.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one windows batch script where I am calling two other batch script.
Possible Duplicate: How to call one batch file after another I have a batch
I have two .exe file and 3 windows batch files and i need to
I have two files lets say a.xls and b.xls . The first one contains
I have 3 batch files, one.bat , two.bat and three.bat . All three bat
I have two batch files which is used to run a large C++ build,
I have two files client.php and server.php. The client file send a HTTP request
I have two files in the same folder that I'd like to run. One
I have two different batch files at two different path. When I call A.bat
In my Windows batch file I have some variable with a various number of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.