Those weird characters are exactly 3 characters: they provide information on the encoding used in multi-byte encoded text files.
So it looks like ProcessStartInfo expects an ASCII (or other 8bit) encoded file.
System.IO.File.WriteAllText has overlaod which accepts an encoding parameter -
System.IO.File.WriteAllText("D:\sa\MSG\sms_old\send.bat", str.Trim(), System.Text.Encoding.ASCII)
But of course, as OriginalGriff mentioned, you do not need the bat file, just use the command and parameters of the Process / ProcessStartInfo correctly
System.Diagnostics.Process.Start("java", "pname """ & s1 & """)