Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open Exe File from another Computer

Status
Not open for further replies.

reymon

Programmer
Jan 2, 2002
2
0
0
PH
I have a program exe in my computer and i have also another exe file in another computer i want to open the exe file in other computer in just a click in the program exe of my computer
 
The only way I can think of to do this is to write a
small server daemon to run on the remote computer.

The daemon runs in the background on the remote computer
listening on a given port and when you start the app
on the local computer you send a message to the remote
computer instructing it to run the app.(or any from a
list of apps) The daemon then forks a process to run the
application. The daemon is probubly more likely to be
written in c,c++ or (easiest of all) java.

This is of course potentially a massive security hole so
be aware of that and consider using passwords or some other
type of security.
 
I have found it easy to run a program that resides on another machine but, I take it that you want to tell the other machine to run a program. If the other machine is running a telnet server you can do something like the below.

First: Generate a command script using whatever telnet package you have. The script should contain the name of the other machine, login, password info, the path/name of the program to run etc. I have not had succes getting the Windows telnet to support scripts but OnNet's telent works.

Second:
ReturnValue = Shell("c:\TNVTPlus\tnvt16 myscript.ste")

Third: 'Loop for a period of time you know to be long
'enough or until the other machine does something
'you can test for
Do
v1 = DoEvents()
Loop Until 'something you can test for

Forth:
'close the telnet session on the other machine if needed
AppActivate ReturnValue
SendKeys "logout{ENTER}", True 'Send Logout command. May
'need to send "{Alt}{F4}" if other machins OS is
'Windows instead of a unix flavor.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top