HMBatch as server


Hi all,
I wanted to launch hypermesh as a server and my client will send various requests to the server.
***********************************************************************************************************************************
SERVER CODE : HM_Server.tcl
***********************************************************************************************************************************
I'm launching the hmopengl.exe using ShellExecuteEx method.
***********************************************************************************************************************************
CLIENT CODE
***********************************************************************************************************************************
The above code is working fine with hmopengl.exe
where as it is not working with hmbatch.exe [ ShExecInfo.lpFile = TEXT('C:\\Program Files\\Altair\\12.0\\hm\\bin\\win64\\hmbatch.exe') ];
I could not find the issue...