我想gammu
用来发送带有地址和消息的短信,但是我的gammu
参数有问题。如果我只启动它运行的程序(string cmd1 = "c:\\G133\\bin\\gammu.exe ";
)。添加参数后,它会失败:
System.ComponentModel.Win32Exception'发生在 System.dll
附加信息:系统找不到指定的文件:
代码:
string[] sms = File.ReadAllLines(@"C:\\temp\\test.txt");
string address = sms[0];
string message = sms[1];
string cmd1 = @"C:\G133\bin\gammu.exe --sendsms TEXT" + " " +
"\"" + address + "\" -text " + " " + "\"" + message + "\"";
System.Diagnostics.Process.Start(cmd1);
谁能帮我?提前致谢。
输出看起来不错:
Console.WriteLine(cmd1); - result
C:\G133\bin\gammu.exe --sendsms TEXT +12121234567 -text "Hello"