Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to spawn a TCL script 1

Status
Not open for further replies.

sengkannan

Technical User
Jul 8, 2003
13
I would like my main TCL script to execute another TCL script file in a new dos window (i.e it should launch a new dos window). Or spawn a new process which is independent of the main script, i.e if the main process is killed the spawned process should continue.
eg "exec start tclsh84.exe MyScript.tcl" gives an error.
But "exec tclsh84.exe MyScript.tcl" works but stops when main script is killed.
 
Hi

As far I remember you need to call [tt]cmd[/tt] :
Code:
exec cmd /c tclsh84.exe MyScript.tcl
I am not sure about [tt]/c[/tt], if not works as desired try [tt]/k[/tt] too. If that will block [tt]exec[/tt], then add [tt]start[/tt], but after [tt]cmd[/tt] :
Code:
exec cmd /c start tclsh84.exe MyScript.tcl
Sorry, I you can see, my Windows related experience is not fresh.

Feherke.
 
Thanks Feherke, that worked great. I have spent weeks looking for that answer on the net. next time I will come straight to tek-tips :)). Thanks again for your input.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top