可以用
WinExec('command / c net send > 1.txt',0);

解决方案 »

  1.   

    to windindance(风之舞)
    net send 不会返回发送是否成功,不能用
      

  2.   

    会返回的呀?
    检查输出的1.txt文件。
      

  3.   

    这种重定向在98下也许有效
    在xp下就不行了,因为Xp下Dos模拟器是cmd.exe 不支持管道各重定向
      

  4.   

    参见
    NET_API_STATUS NetMessageBufferSend(    LPTSTR servername,
        LPTSTR msgname,
        LPTSTR fromname,
        LPBYTE buf,
        DWORD buflen
       );
      

  5.   

    Netapi32.dll
    NET_API_STATUS NetMessageBufferSend(
      LPWSTR servername,
      LPWSTR msgname,
      LPWSTR fromname,
      LPBYTE buf,
      DWORD buflen
      );