Page 1 of 1

Can't create a 2nd TP in a windows batch file.

Posted: Fri Nov 07, 2003 10:08 pm
by chatt
I want to start 8 Textpads with 8 particular workspaces.
If they're in a batch file (under win2K) as follows,

Code: Select all

    CALL textpad -m E:\javaPackages\xag\command\Cmd.tws
    CALL textpad -m E:\javaPackages\xag\component\Component.tws
it runs the first one okay, but doesn't exit.

Thanks,
Peter

Posted: Fri Nov 07, 2003 11:14 pm
by CyberSlug
The batch file will only move to the next call when the previous one has finished. By deafult, the call is not "finished" until its instance of TextPad is both launched and closed.

The fix is to preced the commands with cmd /c start ""

Code: Select all

@echo off
cmd /c start "" textpad -m "E:\javaPackages\xag\command\Cmd.tws"
cmd /c start "" textpad -m "E:\javaPackages\xag\component\Component.tws"
exit

Posted: Fri Nov 07, 2003 11:40 pm
by chatt
Thanks a lot CyberSlug, that works fine.

I guess windows distinguishes between CALLing batch files
and running .EXEs.

Thanks again.
Peter.