Results 1 to 5 of 5

Thread: sending commands

  1. #1

    Thread Starter
    Fanatic Member dark_shadow's Avatar
    Join Date
    Feb 2005
    Location
    Igloo
    Posts
    900

    sending commands

    hi all i've been searching around the forums and found mixed answers to the topic of sending commands to a cmd.exe(command prompt) open window. is it possable? if so can someone show me how its done ? thanks for the help

  2. #2
    Addicted Member
    Join Date
    Apr 2006
    Posts
    155

    Re: sending commands

    Yes, there is a module created by Kevin Wilson that executes commands in command-prompt, you'll need this module (modShellCommand):

    You can get this module here:


    https://secure.filesanywhere.com/v.a...8C%5B%9C%A4vsn

    You can try it out like this:

    VB Code:
    1. Private Sub Form_Load()
    2.     Dim retrieve As String
    3.         ShellCommand "help", retrieve$, vbHide, 30, vbNull, vbNullString, vbNullString
    4.             MsgBox retrieve$
    5. End Sub

    or

    VB Code:
    1. Private Sub Form_Load()
    2.     Dim retrieve As String
    3.         ShellCommand "ping localhost", retrieve$, vbHide, 30, vbNull, vbNullString, vbNullString
    4.             MsgBox retrieve$
    5. End Sub

  3. #3

    Thread Starter
    Fanatic Member dark_shadow's Avatar
    Join Date
    Feb 2005
    Location
    Igloo
    Posts
    900

    Re: sending commands

    thanks for the repy does this actually send the command to the open window?

  4. #4
    PowerPoster jcis's Avatar
    Join Date
    Jan 2003
    Location
    Argentina
    Posts
    4,430

    Re: sending commands

    Maybe you find something useful in this thread:
    http://www.vbforums.com/showthread.php?t=352381

  5. #5

    Thread Starter
    Fanatic Member dark_shadow's Avatar
    Join Date
    Feb 2005
    Location
    Igloo
    Posts
    900

    Re: sending commands

    lol i've looked at that thread a few time but i think the problem is because when i run the command instad of being a normal command shell it show its from the svchost.exe :s i think that may be it
    i explain what i mean a bit better in This Thread
    Last edited by dark_shadow; Jul 30th, 2006 at 06:31 PM.

Posting Permissions

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



Click Here to Expand Forum to Full Width