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

Author Topic: Batch file does not exit  (Read 2685 times)

0 Members and 1 Guest are viewing this topic.

MBFingerhut

  • Guest
Batch file does not exit
« on: November 01, 2006, 10:18:03 AM »
Hi.  I'm trying to make a bat for Win 2000 that will run a few printer related commands and then open an executable.  The printer commands help with a glitch related to the exe.  The printer commands work fine.  I want the final action to start the exe and then have the cmd prompt window close.  Is there some way to have the window close even if the exe is still running?  It does make it all the way to the exe line, but stays open until the exe is closed.  Here is what I have so far:

ECHO OFF
ECHO Initializing printer drivers.
ECHO Correcting for HP related footer problems.
c:
cd\
CALL "c:\LaserJet_Restore_2000.bat"
"C:\INSTRON\COM\MERLIN.EXE"
CLS
EXIT
« Last Edit: November 01, 2006, 10:18:28 AM by MBFingerhut »

2k_dummy



    Specialist
  • A word, once spoken, can never be recalled.
  • Thanked: 14
    Re: Batch file does not exit
    « Reply #1 on: November 01, 2006, 11:01:20 AM »
    start  "C:\INSTRON\COM\MERLIN.EXE"
    If you don't stand for something, you'll fall for anything.
    _______________________________________ ________
    BlackViper

    Software and utilities

    MBFingerhut

    • Guest
    Re: Batch file does not exit
    « Reply #2 on: November 01, 2006, 01:20:57 PM »
    Adding START causes a 2nd cmd window to popup.  This window has a title of C:\INSTRON\COM\MERLIN.EXE and only shows a c: prompt.  The first window closes, but the merlin.exe never opens.

    MBFingerhut

    • Guest
    Re: Batch file does not exit
    « Reply #3 on: November 02, 2006, 06:40:49 AM »
    I figured it out.  I needed to lose the extra quotes.  This worked:

    @ECHO OFF
    ECHO Initializing printer drivers.
    ECHO Correcting for HP related footer problems.
    c:
    cd\
    CALL c:\LaserJet_Restore_2000.bat
    START C:\INSTRON\COM\MERLIN.EXE
    CLS
    EXIT
    « Last Edit: November 02, 2006, 06:41:09 AM by MBFingerhut »