I've noticed subtle differences in execing a batch file on MS Windows with or without prepending the call with the command interpreter, cmd.exe. Here's an example:
(portal_01024) 2 % cd c:/iskv/portal_01024 (portal_01024) 3 % glob * config cti dist help resource resource_cti start_portal.bat (portal_01024) 4 % exec -- start_portal.bat Unable to access jarfile c:\iskv\21c_winbk_\bin\csvstart.jar <==== batch starts, but somethings going wrong internally Das System kann den angegebenen Pfad nicht finden. (portal_01024) 6 % exec -- cmd.exe /c start_portal.bat & <==== this works the same way as if i call the batch from outside of tcl 4660 (portal_01024) 7 % exec -- [auto_execok start_portal.bat] <==== didn't help Unable to access jarfile c:\iskv\21c_winbk_\bin\csvstart.jar Das System kann den angegebenen Pfad nicht finden.
Don't know what's going on yet.
If I use auto_execok xyz.BAT, it gives back ./xyz.BAT, which makes not much sense, since Batches are always interpreted by the command interpreter, cmd.exe, on windows, and ar not executable by themselves. exec bat and exec auto_execok are basically the same and both don't work for me in all cases, since the environment of the BAT is then different than if called via cmd.exe. What does tcl do when execing a BAT? It must be something different than cmd.exe /c bat.