Results 1 to 4 of 4
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,869
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to Close a Batch file StartBP15.bat

    Running Windows 7

    I have the following batch file that I run from the desktop and it works OK

    The problem I'm having is that is leaving two tasks open at the bottom of the screen, 1 for the batch file and 1 for the Access program once loaded

    How do I alter this batch file so the task for the batch file is closed once Access is loaded?

    del C:\NbsA2kFe\*.ldb
    COPY F:\apps\nbs\build\Mast_prg\BUILD15.MDB C:\NbsA2kFe\Build.mdb
    COPY "F:\apps\nbs\build\Mast_prg\UD_DbPrg.MDB" C:\NbsA2kFe
    COPY "F:\apps\nbs\build\Mast_prg\strStorage.dll" C:\NbsA2kFe
    COPY "F:\apps\nbs\build\Mast_prg\DynaPdf.dll" C:\NbsA2kFe

    "C:\Program Files (x86)\Microsoft Office\Office15\MSACCESS.EXE" "C:\NbsA2kFe\Build.mdb" /cmd "CNFBLD"
    exit

  2. #2
    2 Star Lounger JC Zorkoff's Avatar
    Join Date
    Dec 2009
    Location
    Boston, Massachusetts, USA
    Posts
    126
    Thanks
    11
    Thanked 14 Times in 14 Posts
    You should be able to use the "Start" command to launch Access in a separate window.

    In a DOS Window type: start /?
    This will show the following description and much more detail.

    Starts a separate window to run a specified program or command.

    START ["title"] [/D path] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
    [/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
    [/NODE <NUMA node>] [/AFFINITY <hex affinity mask>] [/WAIT] [/B]
    [command/program] [parameters]

  3. #3
    Super Moderator BATcher's Avatar
    Join Date
    Feb 2008
    Location
    A cultural area in SW England
    Posts
    2,832
    Thanks
    19
    Thanked 110 Times in 104 Posts
    START msaccess with a null title, which should close the BATch file as soon as msaccess runs..
    As in
    start "" "C:\Program Files (x86)\Microsoft Office\Office15\MSACCESS.EXE" C:\NbsA2kFe\Build.mdb /cmd CNFBLD

    You should only need double-quotes round parameters which contain a blank, so I've removed those which I think may be unnecessary. But don't leave out the two double-quotes after start!
    BATcher

    Dear Diary, today the Hundred Years War started ...

  4. #4
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,869
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Wow, what a needle in the haystack, thank you both

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •