i am searching for weeks now, and eventually joined lots of forums because i can’t seem to find a way in finding help for the code i want. don’t know the right term on how to search this.
here is what i want to achieve, new to VB6, i have discovered the shell function to run a specific program, but what i want is,
to run a program to a certain pc.
for example,
shell (“//pc-9pc//directory/sample.exe”)
when i run it, the exe file runs in my computer, what i want is for it to run in pc9.
is there a solution for this? is it under shell method?
pls help. i really need to create this for my project.
i’ve also seen winsock, but it seems that its only capable of chatting.
thanks cheers
UPDATE: Attached is a sample of Server/Client Winsock with capability of executing a program remotely (both source code and executable included in the file)
http://dl.dropbox.com/u/14773478/SERVER_CLIENT.zip
Shell will only execute a program on the local machine.
If you need to execute a program remotely then you will need some sort of peer-to-peer programming to tell the other peer to (execute) a certain program. Winsock is a perfect example of how you would achieve that.
Create a server version of Winsock and set it to start listening to a connection request over a certain port. Then create a client version on your local pc and set it to connect to the remote IP or hostname on the selected port number.
After the connection is made, there is no limit to what you can do afterwards. You can program the server side socket to wait for messages like “
Shell c:\program\file.exe” or something you define and customize to your needs. The server side then picks up the message and executes the program.To help you with your requirement, I have done something like that, using only WinSock controls. I advise you to research more on Sockets, try to set up a chat program first. If you succeeded in that, then you are ready to move on to executing programs remotely.