How to? Launch and execute commands in tcmd.exe through MSBuild Script.

Jul 28, 2015
2
0
#1
Hello , I am new to the Take Command Prompt and i am facing what could be a very basic problem. We have been using tcmd.exe to execute some btm files. However that task was being done manually. I have a task now where in i have to execute the same commands through a MSBuild Script.

I have added the tcmd.exe path in the environment variable (C:\Program Files (x86)\JPSoft\TCMD9\tcmd.exe) on the server and i am trying to execute the below command from the build script.

<Exec Command=">tcmd cd /d &quot;$(SolutionRoot)\&quot;" ContinueOnError="false" />
<Exec Command=">tcmd &quot;C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\vsvars32.bat&quot;" ContinueOnError="false" />
<Exec Command=">tcmd &quot;$(SolutionRoot)\_PackAll.btm&quot;" ContinueOnError="false"/>

The problem is that these commands are being executed on the CMD.exe instead of tcmd.exe. So the first and the second command run fine however nothing executes on the 3rd command.

So just wanted to know if there is a way through which we can execute commands on tcmd.exe through MSBuild script.
 

rconn

Administrator
Staff member
May 14, 2008
10,746
97
#3
As Charles said, you probably want to be using TCC, not TCMD. You can execute batch files either directly with TCC, or indirectly by having TCMD call TCC. To do the latter, you need to associate TCC with batch files so TCMD will know what to call.

For build scripts, it's probably better to use TCC directly, as it will be much faster and you don't need the TCMD GUI.
 
Jul 28, 2015
2
0
#4
As Charles said, you probably want to be using TCC, not TCMD. You can execute batch files either directly with TCC, or indirectly by having TCMD call TCC. To do the latter, you need to associate TCC with batch files so TCMD will know what to call.

For build scripts, it's probably better to use TCC directly, as it will be much faster and you don't need the TCMD GUI.
Thanks a lot Charles and rconn for your suggestion. I would try this out in the script and would share that on this thread. Thanks again for your time.