当前位置:主页>delphi源码/MIS软件> 文章内容

请教一个执行带参数的系统命令的问题

发布时间:2010-01-21 | QQ免费站
1楼: 想在程序中执行 aaa.exe -a > c:\test.txt 用了shellexecute(self.handle, nil, ‘aaa.exe‘, ‘ -a > c:\test.txt‘, nil, SW_show); 无论如何都不能生成test.txt文件,请问高手应该怎样才能执行我的命令啊 谢谢!!! 字串2

2楼: 把这行aaa.exe -a > c:\test.txt写入到一个批处理文件中试试。

字串6

3楼: //试试 winexec(‘aaa.exe -a > c:\test.txt‘, nil, SW_show);

字串7

4楼: shellexecute(self.handle, nil, ‘aaa.exe‘, ‘ -a > c:\test.txt‘, nil, SW_show);还是shellexecute(self.handle, nil, ‘aaa.exe‘, ‘ -a >> c:\test.txt‘, nil, SW_show); 我胡说的,你可以试试 字串2

5楼: 我原来就是写到批处理里的

字串5

6楼: 高手指点一下啊 字串2