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
Printable View
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
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:
Private Sub Form_Load() Dim retrieve As String ShellCommand "help", retrieve$, vbHide, 30, vbNull, vbNullString, vbNullString MsgBox retrieve$ End Sub
or
VB Code:
Private Sub Form_Load() Dim retrieve As String ShellCommand "ping localhost", retrieve$, vbHide, 30, vbNull, vbNullString, vbNullString MsgBox retrieve$ End Sub
thanks for the repy does this actually send the command to the open window?
Maybe you find something useful in this thread:
http://www.vbforums.com/showthread.php?t=352381
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