Hi Julie,
I’m sure there are other ways to do this, but here’s what we do. In the bat file, we call the TCL script using parameters passed into the bat file. The %1 is the site id and %2 is the filename for the TCL script. Here’s what’s in the bat file:
call quovadxqdx5.3integratorsbinsetroot quovadxqdx5.3integrator %1
cd quovadxqdx5.3integratorbin
hcitcl %2
In the TCL script, we have a proc to check the status of a thread:
proc isThreadUp {tname} {
set reply [msiGetStatSample tname]
catch {keylget reply PSTATUS} result
if {$result == “up”} {
return 1
} else {
return 0
}
}
and also procs to start and stop threads:
proc startThread {pname tname} {
set cmd “pstart”
catch {exec cmd.exe /c hcicmd -p $pname -c “$tname $cmd”} result
}
proc stopThread {pname tname} {
set cmd “pstop”
catch {exec cmd.exe /c hcicmd -p $pname -c “$tname $cmd”} result
}
At the beginning of the TCL script you also need to have:
msiAttach
I hope that helps.
Rick