Re: How do I get a batch file to exit?

Tech-Archive recommends: Fix windows errors by optimizing your registry



Batch files terminate automatically after executing
the last line of code.


"Gonzo" <no@xxxxxx> wrote in message
news:ekgv%23WGGHHA.1216@xxxxxxxxxxxxxxxxxxxxxxx
Which part does the exit?

"Pegasus (MVP)" <I.can@xxxxxxx> wrote in message
news:OWmhNLGGHHA.1240@xxxxxxxxxxxxxxxxxxxxxxx

"Gonzo" <no@xxxxxx> wrote in message
news:e5lnOBGGHHA.3464@xxxxxxxxxxxxxxxxxxxxxxx
I have a batch file that opens a peice [piece?] of software, however
the
command
prompt windows stays open and I want it to exit. thisis an example I
run
to
open Word, I thought exit would work but it doesn't. If I close Word
it
closes the batch file.

cd "c:\program files\microsoft office\office11\"
"C:\Program Files\Microsoft Office\OFFICE11\winword.exe
Exit


The command "Exit" is unnecessary. The rest goes like so:

@echo off
cd /d "c:\program files\microsoft office\office11\"
start /b "MS Word" "C:\Program Files\Microsoft
Office\OFFICE11\winword.exe"







.



Relevant Pages

  • Re: Exit Value = 35584 from Java.lang.Process
    ... Runtime.exec *does not* invoke a command processor. ... zero-means-success is a common convention but is by no means required. ... the batch file was executing. ... TheNoClassDefError is unrelated to the exit value and just happened to ...
    (comp.lang.java.programmer)
  • Re: Delete/Entry=### fails to stop job execution
    ... >>have done the default ON ERROR THEN EXIT handling and run down the ... >>batch job with. ... Terminating Executing Batch Jobs ... command procedures would normally exe- ...
    (comp.os.vms)
  • Re: Delete/Entry=### fails to stop job execution
    ... The DELETE/ENTRY command appears to be doing a force ... I would think it should also delete process that is executing the command ... Or use ON ERROR to jump to an exit routine. ...
    (comp.os.vms)
  • Re: dd command & reading in background
    ... ^ D,"UnixReview: Shell Corner: The dspl Korn Shell ... user input timeout, do a search on C.U.S. for the ... # 0<c<127 - job exited with this exit code ...
    (comp.unix.shell)
  • Re: Terminating Access Applications
    ... frmTest is OPEN and you exit the application by calling any of these three exit ... Executing a routine that closes all open forms prior to calling any of the ... all Form member variables are still available in both Form_Unload ... I also added error handling to catch an issue ...
    (microsoft.public.access.formscoding)