Results 1 to 5 of 5
  1. #1
    Lounger
    Join Date
    Dec 2004
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    how to use NET SEND in VB (VB6)

    Hi
    i try to use the net send command from vb as below but it didnt work,
    can anyone guide me the correct syntax.

    Dim sentmsg as string
    sentmsg = shell("net send 20.195.132.87 TESTING SENT",vbNormalFocus)

    Thanks
    Gan

  2. #2
    3 Star Lounger
    Join Date
    Apr 2004
    Location
    Boston, Massachusetts, USA
    Posts
    389
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: how to use NET SEND in VB (VB6)

    The Shell command does not return the output of the command -- it returns the command's PID.

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: how to use NET SEND in VB (VB6)

    I think this is related to another thread that you started. Please keep closely related posts in the same thread so that people jumping in can see the history of the project.

  4. #4
    Lounger
    Join Date
    Dec 2004
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: how to use NET SEND in VB (VB6)

    Hi,
    If i want to return dos net send output from vb, what are the syntax should use?

    Thanks
    Gan

  5. #5
    3 Star Lounger
    Join Date
    Apr 2004
    Location
    Boston, Massachusetts, USA
    Posts
    389
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: how to use NET SEND in VB (VB6)

    I think you might need an API call for that (see the thread at <post#=81357>post 81357</post#>.

    It can also be done with a somewhat roundabout technique using an available scripting language that does return the output from system calls (see http://www.perl.com/pub/a/2005/05/26/word_control.html for an example of such a technique).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •