Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#125 COMMAND /C does not work for BAT files

0.58
closed
5
2012-09-07
2003-04-03
Mirek Luza
No

The COMMAND /C <filename> does not work for BAT
files (just for EXEs, COMs). This leads to problems for
example in Volkov Commander: it is possible to start
COM and EXE files from it, but not BAT files. In order to
start a BAT file it is necessary to quit the Volkov
Commander.
Volkov Commander is quite usefull as file manager in
DOSBOX (I start it by default in DOSBOX, it is far better
than just working from a command line) - just the
inability to run BAT files from it is a problem.

Discussion

  • Peter Veenstra
    Peter Veenstra
    2003-04-08

    Logged In: YES
    user_id=535630

    you are right.

    weird command /c moves eventually into execute.
    which sees that it's a bat file and starts the bat handler for
    it (at least it is designed to work that way.)

    Will see why it fails.
    Peter

     
  • Peter Veenstra
    Peter Veenstra
    2003-04-08

    Logged In: YES
    user_id=535630

    Mirek,
    the shellparser created a bf handler. but it wasn't executed as
    the shell exited at once. Added an extra layer to cope with
    this.
    Try it and mail me if you have any problems left.
    Closing this report as i think i programmed it well ;)
    Peter

     
  • Mirek Luza
    Mirek Luza
    2003-04-09

    Logged In: YES
    user_id=433572

    I tried the new sources and it does not work properly. It
    executes the BAT file but instead of returning to the originall
    shell it freezes DOSBOX.

    How I tried it:
    I made a simple BAT file E.BAT which started START.EXE in
    the game Eye Of Beholder. When I started the BAT file using
    COMMAND /C or from Volkov Commander, the game started,
    but when I exited, the DOSBOX froze.

    I tried another game (Realms Of Arkania 1, it has more
    complicated BAT file) and it did not even started the game
    (froze during the processing of the file).

     
  • Peter Veenstra
    Peter Veenstra
    2003-04-15

    Logged In: YES
    user_id=535630

    it seems to go wrong with the file table.
    it doesn't return to the batchfile as the filehandle of the
    batchfile is closed and dosbox is reading nonsense from a
    closed filehandle (well reading...)
    it gets closed when the command exists and maybe more
    things go wrong internal.

     
  • Justin Kerk
    Justin Kerk
    2003-04-29

    Logged In: YES
    user_id=134009

    It seems to work all right for me with latest CVS...

    (That Volkov Commander is sweet - I have it autorunning now
    too :D )

     
  • Mirek Luza
    Mirek Luza
    2003-04-29

    Logged In: YES
    user_id=433572

    No, it does not work. Try to make BAT file which calls 2 EXE
    files. First one will be ok, then it crashes.

    It works only for simple BAT files which call just one program.

    Mirek

     
  • Peter Veenstra
    Peter Veenstra
    2003-05-02

    Logged In: YES
    user_id=535630

    Added support for the don't inherit flag and updated the psp
    routines to use this flag.

    test.bat: which executes mem and loadifx
    works now and returns to the shell