exec(“mode COM16: BAUD=9600 PARITY=n DATA=8 STOP=1”); $str = “your msg”; exec(“set /p x=”$str” <nul >.COM16″);